git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 4/4] reftable/stack: avoid reloading the stack when already locked

From
Jeff King <peff@peff.net>
Date
Aug 24, 2026, 22:52 UTC
Message-ID
<20260824225202.GA190620@coredump.intra.peff.net>
In-Reply-To
<20260824-740-optimize-reloading-the-reftable-stack-v2-4-9c9de2eb0af7@gmail.com>
On Mon, Aug 24, 2026 at 11:31:02AM +0200, Karthik Nayak wrote:
Show 10 quoted lines
> Benchmarking with a fixed, non-symbolic target OID in the 'refs/tags/'
> namespace (since it triggers a stack reload when checking if reflog
> exists for the given tag name), shows a consistent 15-20% improvement
> with these patches:
> 
>   refcount   master     patch     speedup
>   --------   -------    -------   -------
>   2,000       18.5 ms    16.6 ms   1.11x
>   20,000     120.7 ms   102.8 ms   1.17x
>   50,000     296.5 ms   247.1 ms   1.20x
Much nicer. :)

I'm not very familiar with the reftable code, so you can take my review with a huge grain of salt. But I think the idea is sound, and I didn't see anything obviously wrong. Thanks for working on this.

-Peff
Previous: Karthik NayakNext: Karthik Nayak
Message 8 of 9 in “reftable/stack: avoid reloading the stack when locked”
  1. 0/4 reftable/stack: avoid reloading the stack when lockedKarthik Nayak, Aug 24, 2026
  2. 1/4 reftable/stack: remove `REFTABLE_STACK_NEW_ADDITION_RELOAD`Karthik Nayak, Aug 24, 2026
  3. 2/4 reftable/stack: rename reftable_stack_new_addition()Karthik Nayak, Aug 24, 2026
  4. 3/4 reftable/stack: move list lock to `struct reftable_stack`Karthik Nayak, Aug 24, 2026
  5. Patrick SteinhardtAug 25, 2026
  6. Karthik NayakAug 26, 2026
  7. 4/4 reftable/stack: avoid reloading the stack when already lockedKarthik Nayak, Aug 24, 2026
  8. Jeff KingAug 24, 2026
  9. Karthik NayakAug 26, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.