summaryrefslogtreecommitdiff
path: root/pack-objects.h
diff options
context:
space:
mode:
authorLibravatar Jeff Hostetler <jeffhost@microsoft.com>2017-04-19 17:06:17 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-04-19 20:33:01 -0700
commit06b6d81b7929ce6f5542ba869e7bb9d8e437e6f8 (patch)
treef32cb511019cbb2065a5ad762d29dcc13402d111 /pack-objects.h
parentread-cache: speed up add_index_entry during checkout (diff)
downloadtgif-06b6d81b7929ce6f5542ba869e7bb9d8e437e6f8.tar.xz
read-cache: speed up has_dir_name (part 1)
Teach has_dir_name() 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. has_dir_name() is looking for file/directory collisions in the index and has to consider each sub-directory prefix in turn. This can cause multiple binary searches for each path. During operations like checkout, merge_working_tree() populates the new index in sorted order, so we expect to be able to append in many cases. This commit is part 1 of 2. This commit handles the top of has_dir_name() and the trivial optimization. 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