Re: [PATCH] packfile: fix perf regression with many packs
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Aug 13, 2026, 08:25 UTC
- Message-ID
- <ed5c651f-648f-f58c-bbd3-3db295515913@gmx.de>
- In-Reply-To
- <20260812212955.GA152730@coredump.intra.peff.net>
Hi Jeff,
On Wed, 12 Aug 2026, Jeff King wrote:
Show 20 quoted lines
> On Wed, Aug 12, 2026 at 12:51:30PM -0700, Junio C Hamano wrote:
>
> > "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
> > writes:
> [...]
> but...
>
> > > --- a/t/perf/p5303-many-packs.sh
> > > +++ b/t/perf/p5303-many-packs.sh
> > > @@ -141,4 +141,8 @@ test_perf "load 10,000 packs" '
> > > git rev-parse --verify "HEAD^{commit}"
> > > '
> > >
> > > +test_perf "abbreviate with 10,000 packs" '
> > > + git rev-parse --short HEAD
> > > +'
>
> ...I wonder what value this is adding. It shows the same slowdown as the
> existing test you can see in the context (and whose results I showed
> above).I do think that there is value in adding this. It not only directly reflects what GIT_PS1 runs, but it also exercises a subtly different path: `--short` has to look for the unique abbreviation, whereas `--verify` can stop as soon as it found the OID already.
Ciao, Johannes