Re: weird quadratic reftable behavior, was: Re: [PATCH 3/3] t5551: pack refs after creating many tags
- From
Kristofer Karlsson <krka@spotify.com>
- Date
- Jul 6, 2026, 11:37 UTC
- Message-ID
- <CAL71e4Pzq176Weu_R7vvCQUgqv5Z=88W82-K-oZdqxoSOQ0=rA@mail.gmail.com>
- In-Reply-To
- <aktPP_aRI5Xfo4RA@pks.im>
On Mon, 6 Jul 2026 at 08:46, Patrick Steinhardt <ps@pks.im> wrote:
Show 5 quoted lines
> > An easy scenario where you don't have to disable compaction would be > what Peff posted: you create X references and then delete all of them. > That shouldn't result in compaction and directly hits the case that we > care about.
Right, thanks. The recreate-same-refs case works with compaction enabled and shows the expected improvement (~100x for 8000 refs).
I also found a worse case that feels more realistic: delete 8000 "old-*" refs, then create 8000 "new-*" refs. Since "new" is lexicographically after "old", every create scans all tombstones. That one goes from 27s to 0.09s after fixing it.
> If we can demonstrate a significant improvement in the above case then > it would be worth it, I guess.
I will clean up the patch and submit it shortly.
Thanks, Kristofer