diff options
author | Derrick Stolee <dstolee@microsoft.com> | 2020-12-08 17:05:21 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-12-08 14:49:06 -0800 |
commit | 341fa34887630a7adf6b3a771ae866ce66e7967e (patch) | |
tree | 77bdbc7a2309b117bbcbaf30d5949758470df7b4 /t/t9301-fast-import-notes.sh | |
parent | pack-bitmap: factor out 'add_commit_to_bitmap()' (diff) | |
download | tgif-341fa34887630a7adf6b3a771ae866ce66e7967e.tar.xz |
pack-bitmap-write: use existing bitmaps
When constructing new bitmaps, we perform a commit and tree walk in
fill_bitmap_commit() and fill_bitmap_tree(). This walk would benefit
from using existing bitmaps when available. We must track the existing
bitmaps and translate them into the new object order, but this is
generally faster than parsing trees.
In fill_bitmap_commit(), we must reorder thing somewhat. The priority
queue walks commits from newest-to-oldest, which means we correctly stop
walking when reaching a commit with a bitmap. However, if we walk trees
interleaved with the commits, then we might be parsing trees that are
actually part of a re-used bitmap. To avoid over-walking trees, add them
to a LIFO queue and walk them after exploring commits completely.
On git.git, this reduces a second immediate bitmap computation from 2.0s
to 1.0s. On linux.git, we go from 32s to 22s. On chromium's fork
network, we go from 227s to 198s.
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9301-fast-import-notes.sh')
0 files changed, 0 insertions, 0 deletions