]> git.ipfire.org Git - thirdparty/git.git/commit
t/perf: add perf test for ref tombstone scenarios
authorKristofer Karlsson <krka@spotify.com>
Fri, 10 Jul 2026 10:36:06 +0000 (10:36 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 10 Jul 2026 15:18:56 +0000 (08:18 -0700)
commit13d8160f4922d88aa26eb2eea74cab3fa29848b8
tree31bda6252dedc2aadcf7ada684708d4fbb98e12d
parentf85a7e662054a7b0d9070e432508831afa214b47
t/perf: add perf test for ref tombstone scenarios

Add performance tests for update-ref when many tombstones are present
in a reftable.

The first test exercises the scenario where all refs are deleted
(creating tombstones) and then re-created with the same names, which
currently exhibits quadratic behavior.

The second test uses a separate repository with an asymmetric variant
where refs are deleted and then new, differently-named refs are
created.  When the tombstones sort after the new refs, every create
scans all tombstones, making this case even worse than re-creating
the same refs.

Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Kristofer Karlsson <krka@spotify.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/perf/p1401-ref-store-tombstones.sh [new file with mode: 0755]