Subject: Re: Performance regression in "update" hooks

From: Junio C Hamano <[email-masked]>
Date: Mon, 02 Mar 2026 10:54:19 -0800

Adrian Ratiu <[email-masked]> writes:

> On Mon, 02 Mar 2026, Jeff King <[email-masked]> wrote:
>> On Mon, Mar 02, 2026 at 03:27:22PM +0100, Patrick Steinhardt wrote:
>>
>>> > > I don't have the benchmark setup and it might be easier for you to
>>> > > confirm?
>>> 
>>> All you need is a normal development infra and hyperfine. The
>>> benchmarking scripts in the repo I linked should then "just work" with
>>> the above invocation.
>>
>> Thanks, these were very cool and easy to use.
>>
>> Looking at the patch, my guess was that the problem is that we are now
>> setting up and tearing down the sideband muxer for each hook invocation.
>> This is expensive for the "update" hook, since it fires once per ref.
>
> I independently root caused it and came up with (mostly) the same fix,
> so this is a very good confirmation, thanks!
>
> Please wait for my patch because it needs fixing it 3 places, for 3
> hooks which spin up/down no-op async threads. :)

Thanks for working on the problem report and coming to a fix so
quickly.