summaryrefslogtreecommitdiff
path: root/t/t4033-diff-patience.sh
diff options
context:
space:
mode:
authorLibravatar Jacob Vosmaer <jacob@gitlab.com>2021-01-20 13:45:14 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-01-22 17:27:42 -0800
commitbe18153b975844f8792b03e337f1a4c86fe87531 (patch)
treea3afd5d4480bac8efd6065542328bf126dd0e9b4 /t/t4033-diff-patience.sh
parentThe third batch (diff)
downloadtgif-be18153b975844f8792b03e337f1a4c86fe87531.tar.xz
builtin/pack-objects.c: avoid iterating all refs
In git-pack-objects, we iterate over all the tags if the --include-tag option is passed on the command line. For some reason this uses for_each_ref which is expensive if the repo has many refs. We should use for_each_tag_ref instead. Because the add_ref_tag callback will now only visit tags we simplified it a bit. The motivation for this change is that we observed performance issues with a repository on gitlab.com that has 500,000 refs but only 2,000 tags. The fetch traffic on that repo is dominated by CI, and when we changed CI to fetch with 'git fetch --no-tags' we saw a dramatic change in the CPU profile of git-pack-objects. This lead us to this particular ref walk. More details in: https://gitlab.com/gitlab-com/gl-infra/scalability/-/issues/746#note_483546598 Signed-off-by: Jacob Vosmaer <jacob@gitlab.com> Reviewed-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4033-diff-patience.sh')
0 files changed, 0 insertions, 0 deletions