summaryrefslogtreecommitdiff
path: root/contrib/hg-to-git/hg-to-git.py
diff options
context:
space:
mode:
authorDerrick Stolee <derrickstolee@github.com>2022-09-26 13:17:57 (GMT)
committerJunio C Hamano <gitster@pobox.com>2022-09-26 19:09:18 (GMT)
commit89a1ab8fb5766d0474ff72f176804508b0558f8a (patch)
treeb82b6401f81836a796464e49a11f6cd15aa806d5 /contrib/hg-to-git/hg-to-git.py
parent969a5645876ccf368ed74fde2c5dc9b5432b7bb0 (diff)
downloadgit-89a1ab8fb5766d0474ff72f176804508b0558f8a.zip
git-89a1ab8fb5766d0474ff72f176804508b0558f8a.tar.gz
git-89a1ab8fb5766d0474ff72f176804508b0558f8a.tar.bz2
pack-bitmap: remove trace2 region from hot path
The trace2 region around the call to lazy_bitmap_for_commit() in bitmap_for_commit() was added in 28cd730680d (pack-bitmap: prepare to read lookup table extension, 2022-08-14). While adding trace2 regions is typically helpful for tracking performance, this method is called possibly thousands of times as a commit walk explores commit history looking for a matching bitmap. When trace2 output is enabled, this region is emitted many times and performance is throttled by that output. For now, remove these regions entirely. This is a critical path, and it would be valuable to measure that the time spent in bitmap_for_commit() does not increase when using the commit lookup table. The best way to do that would be to use a mechanism that sums the time spent in a region and reports a single value at the end of the process. This technique was introduced but not merged by [1] so maybe this example presents some justification to revisit that approach. [1] https://lore.kernel.org/git/pull.1099.v2.git.1640720202.gitgitgadget@gmail.com/ To help with the 'git blame' output in this region, add a comment that warns against adding a trace2 region. Delete a test from t5310 that used that trace output to check that this lookup optimization was activated. To create this kind of test again in the future, the stopwatch traces mentioned earlier could be used as a signal that we activated this code path. Helpedy-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Derrick Stolee <derrickstolee@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/hg-to-git/hg-to-git.py')
0 files changed, 0 insertions, 0 deletions