Skip to content

Commit c144241

Browse files
derrickstoleegitster
authored andcommitted
midx: drop chunk progress during write
Most expensive operations in write_midx_internal() use the context struct's progress member, and these indicate the process of the expensive operations within the chunk writing methods. However, there is a competing progress struct that counts the progress over all chunks. This is not very helpful compared to the others, so drop it. This also reduces our barriers to combining the chunk writing code with chunk-format.c. Signed-off-by: Derrick Stolee <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 0ccd713 commit c144241

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

midx.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,6 @@ static int write_midx_internal(const char *object_dir, struct multi_pack_index *
808808
uint64_t header_size = 0;
809809
uint32_t chunk_ids[MIDX_MAX_CHUNKS + 1];
810810
uint64_t chunk_offsets[MIDX_MAX_CHUNKS + 1];
811-
struct progress *progress = NULL;
812811
int pack_name_concat_len = 0;
813812
int dropped_packs = 0;
814813
int result = 0;
@@ -976,9 +975,6 @@ static int write_midx_internal(const char *object_dir, struct multi_pack_index *
976975
hashwrite_be64(f, chunk_offsets[i]);
977976
}
978977

979-
if (flags & MIDX_PROGRESS)
980-
progress = start_delayed_progress(_("Writing chunks to multi-pack-index"),
981-
num_chunks);
982978
for (i = 0; i < num_chunks; i++) {
983979
if (f->total + f->offset != chunk_offsets[i])
984980
BUG("incorrect chunk offset (%"PRIu64" != %"PRIu64") for chunk id %"PRIx32,
@@ -1011,10 +1007,7 @@ static int write_midx_internal(const char *object_dir, struct multi_pack_index *
10111007
BUG("trying to write unknown chunk id %"PRIx32,
10121008
chunk_ids[i]);
10131009
}
1014-
1015-
display_progress(progress, i + 1);
10161010
}
1017-
stop_progress(&progress);
10181011

10191012
if (hashfile_total(f) != chunk_offsets[num_chunks])
10201013
BUG("incorrect final offset %"PRIu64" != %"PRIu64,

0 commit comments

Comments
 (0)