diff options
author | Jeff Hostetler <jeffhost@microsoft.com> | 2017-04-19 17:06:17 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-04-19 20:33:01 -0700 |
commit | 06b6d81b7929ce6f5542ba869e7bb9d8e437e6f8 (patch) | |
tree | f32cb511019cbb2065a5ad762d29dcc13402d111 /pack-objects.h | |
parent | read-cache: speed up add_index_entry during checkout (diff) | |
download | tgif-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