Re: [PATCH] packfile: fix perf regression with many packs

Johannes Schindelin <[email protected]>
Newsgroups org.kernel.vger.git
Message-ID <[email protected]>
Hi Jeff,

On Wed, 12 Aug 2026, Jeff King wrote:

> On Wed, Aug 12, 2026 at 12:51:30PM -0700, Junio C Hamano wrote:
> 
> > "Johannes Schindelin via GitGitGadget" <[email protected]>
> > 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.