diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-12-16 13:08:31 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-12-16 13:08:32 -0800 |
commit | 6d831b8a3ec7dc06981e6347eb9a45849ef88665 (patch) | |
tree | fc092e735f665fb642eb9e03e5c5769bd3aa99c9 /t/perf | |
parent | Merge branch 'js/builtin-add-i-cmds' (diff) | |
parent | packfile.c: speed up loading lots of packfiles (diff) | |
download | tgif-6d831b8a3ec7dc06981e6347eb9a45849ef88665.tar.xz |
Merge branch 'cs/store-packfiles-in-hashmap'
In a repository with many packfiles, the cost of the procedure that
avoids registering the same packfile twice was unnecessarily high
by using an inefficient search algorithm, which has been corrected.
* cs/store-packfiles-in-hashmap:
packfile.c: speed up loading lots of packfiles
Diffstat (limited to 't/perf')
-rwxr-xr-x | t/perf/p5303-many-packs.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/t/perf/p5303-many-packs.sh b/t/perf/p5303-many-packs.sh index a369152c47..7ee791669a 100755 --- a/t/perf/p5303-many-packs.sh +++ b/t/perf/p5303-many-packs.sh @@ -85,4 +85,22 @@ do ' done +# Measure pack loading with 10,000 packs. +test_expect_success 'generate lots of packs' ' + for i in $(test_seq 10000); do + echo "blob" + echo "data <<EOF" + echo "blob $i" + echo "EOF" + echo "checkpoint" + done | + git -c fastimport.unpackLimit=0 fast-import +' + +# The purpose of this test is to evaluate load time for a large number +# of packs while doing as little other work as possible. +test_perf "load 10,000 packs" ' + git rev-parse --verify "HEAD^{commit}" +' + test_done |