summaryrefslogtreecommitdiff
path: root/diffcore-rename.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-05-13 10:47:06 +0200
committerJunio C Hamano <gitster@pobox.com>2024-05-13 17:04:16 -0700
commit9a59b65dba0820671753f636e9417bfd63ea20c1 (patch)
treef0b817c0327ce534b1f2f4d9ead921731467e657 /diffcore-rename.c
parentd537ce6b9ed75d50c6b8ad071439b06c1b70c5f8 (diff)
reftable/reader: avoid copying index iterator
When doing an indexed seek we need to walk down the multi-level index until we finally hit a record of the desired indexed type. This loop performs a copy of the index iterator on every iteration, which is both hard to understand and completely unnecessary. Refactor the code so that we use a single iterator to walk down the indices, only. Note that while this should improve performance, the improvement is negligible in all but the most unreasonable repositories. This is because the effect is only really noticeable when we have to walk down many levels of indices, which is not something that a repository would typically have. So the motivation for this change is really only about readability. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diffcore-rename.c')
0 files changed, 0 insertions, 0 deletions