diff options
author | Derrick Stolee <dstolee@microsoft.com> | 2017-10-08 14:49:40 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-10-13 09:26:03 +0900 |
commit | 5b20ace6a81e5fe1366b07c51b1f577f356a20ff (patch) | |
tree | 25979ec9b5986984484302bd56f832572a021d85 /upload-pack.c | |
parent | p4211-line-log.sh: add log --online --raw --parents perf test (diff) | |
download | tgif-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 'upload-pack.c')
0 files changed, 0 insertions, 0 deletions