summaryrefslogtreecommitdiff
path: root/pack-objects.h
diff options
context:
space:
mode:
authorLibravatar Derrick Stolee <dstolee@microsoft.com>2017-10-08 14:49:40 -0400
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-10-13 09:26:03 +0900
commit5b20ace6a81e5fe1366b07c51b1f577f356a20ff (patch)
tree25979ec9b5986984484302bd56f832572a021d85 /pack-objects.h
parentp4211-line-log.sh: add log --online --raw --parents perf test (diff)
downloadtgif-5b20ace6a81e5fe1366b07c51b1f577f356a20ff.tar.xz
sha1_name: unroll len loop in find_unique_abbrev_r()
Unroll the while loop inside find_unique_abbrev_r to avoid iterating through all loose objects and packfiles multiple times when the short name is longer than the predicted length. Instead, inspect each object that collides with the estimated abbreviation to find the longest common prefix. The focus of this change is to refactor the existing method in a way that clearly does not change the current behavior. In some cases, the new method is slower than the previous method. Later changes will correct all performance loss. Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Reviewed-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pack-objects.h')
0 files changed, 0 insertions, 0 deletions