From: Kristofer Karlsson Date: Mon, 06 Jul 2026 11:37:36 GMT Subject: Re: weird quadratic reftable behavior, was: Re: [PATCH 3/3] t5551: pack refs after creating many tags Message-ID: In-Reply-To: On Mon, 6 Jul 2026 at 08:46, Patrick Steinhardt wrote: > > 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