diff options
author | Jeff Hostetler <jeffhost@microsoft.com> | 2017-04-19 17:06:16 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-04-19 20:33:01 -0700 |
commit | e5494631ed94017da862d55eb6393a0d01d8b91d (patch) | |
tree | 82c6594b2b7203bd72c63a33fa243becafd27236 /pack-objects.h | |
parent | p0006-read-tree-checkout: perf test to time read-tree (diff) | |
download | tgif-e5494631ed94017da862d55eb6393a0d01d8b91d.tar.xz |
read-cache: speed up add_index_entry during checkout
Teach add_index_entry_with_check() to see if the path
of the new item is greater than the last path in the
index array before attempting to search for it.
During checkout, merge_working_tree() populates the new
index in sorted order, so this change will save a binary
lookups per file. This preserves the original behavior
but simply checks the last element before starting the
search.
This helps performance on very large repositories.
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pack-objects.h')
0 files changed, 0 insertions, 0 deletions