summaryrefslogtreecommitdiff
path: root/pack-objects.h
diff options
context:
space:
mode:
authorLibravatar Jeff Hostetler <jeffhost@microsoft.com>2017-04-19 17:06:16 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-04-19 20:33:01 -0700
commite5494631ed94017da862d55eb6393a0d01d8b91d (patch)
tree82c6594b2b7203bd72c63a33fa243becafd27236 /pack-objects.h
parentp0006-read-tree-checkout: perf test to time read-tree (diff)
downloadtgif-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