aboutsummaryrefslogtreecommitdiffstats
path: root/git.c
diff options
context:
space:
mode:
authorDerrick Stolee <dstolee@microsoft.com>2018-03-22 13:40:10 -0400
committerJunio C Hamano <gitster@pobox.com>2018-03-22 11:00:07 -0700
commit0aaf05b3bdc1ce48bed9f8dcba54153a2b7cdc09 (patch)
treefd06aa1480c757931a502d9b0f096a08c5636480 /git.c
parentpackfile: define and use bsearch_pack() (diff)
downloadgit-0aaf05b3bdc1ce48bed9f8dcba54153a2b7cdc09.tar.gz
git-0aaf05b3bdc1ce48bed9f8dcba54153a2b7cdc09.zip
sha1_name: use bsearch_pack() for abbreviations
When computing abbreviation lengths for an object ID against a single packfile, the method find_abbrev_len_for_pack() currently implements binary search. This is one of several implementations. One issue with this implementation is that it ignores the fanout table in the pack- index. Translate this binary search to use the existing bsearch_pack() method that correctly uses a fanout table. Due to the use of the fanout table, the abbreviation computation is slightly faster than before. For a fully-repacked copy of the Linux repo, the following 'git log' commands improved: * git log --oneline --parents --raw Before: 59.2s After: 56.9s Rel %: -3.8% * git log --oneline --parents Before: 6.48s After: 5.91s Rel %: -8.9% Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git.c')
0 files changed, 0 insertions, 0 deletions