From: Patrick Steinhardt <ps@pks.im>
To: Jeff King <peff@peff.net>
Cc: Junio C Hamano <gitster@pobox.com>,
Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org,
Johannes Schindelin <johannes.schindelin@gmx.de>
Subject: Re: [PATCH] packfile: fix perf regression with many packs
Date: Thu, 13 Aug 2026 09:35:58 +0200 [thread overview]
Message-ID: <an1z3uy7Xtqw3U_l@pks.im> (raw)
In-Reply-To: <20260812212955.GA152730@coredump.intra.peff.net>
On Wed, Aug 12, 2026 at 05:29:55PM -0400, Jeff King wrote:
> On Wed, Aug 12, 2026 at 12:51:30PM -0700, Junio C Hamano wrote:
>
> > "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
> > writes:
> >
> > > In one reported use case (https://github.com/microsoft/git/issues/970),
> > > N equals 37,815 and caused a slow-down of a simple `git rev-parse
> > > --short HEAD` (which is regularly executed as part of `GIT_PS1`) from
> > > 0.4s to 4.5s. In another, heavily exercised CI scenario, clone times
> > > increased from under 2 minutes to over half an hour.
> >
> > Face with Rolling Eyes (1f644) 🙄
> >
> > As we grow older, more and more extreme use cases that we initially
> > thought were simply crazy become reality.
>
> Sort of. The quadratic adding became a problem long ago, hence
> ec48540fe8 (packfile.c: speed up loading lots of packfiles, 2019-11-27).
>
> So this was something we already dealt with that regressed. We can even
> see the regression in our perf suite:
>
> $ GIT_SKIP_TESTS='p5303.[1-9] p5303.1[0-9]' ./run 589127caa730^ 589127caa730 p5303-many-packs.sh
> Test 589127caa730^ 589127caa730
> ----------------------------------------------------------------------
> 5303.21: load 10,000 packs 0.13(0.11+0.02) 0.45(0.42+0.02) +246.2%
>
> Unfortunately I don't think anybody pays close attention to the perf
> suite (partially because it's clunky and expensive to run, but also
> because it often requires human judgement to decide when something is a
> real change and not just a blip).
Yeah, that's a problem indeed. At GitLab we do have Bencher set up for
continuous benchmarking [1], but due to recent changes to our CI setup
those are now very flaky because seemingly, we flip-flop between two
different runners that have different specs. But we're obviously missing
a test there with lots of packfiles, so we didn't catch this regression.
Thanks!
Patrick
[1]: https://bencher.dev/perf/git/plots
next prev parent reply other threads:[~2026-08-13 7:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-12 19:11 [PATCH] packfile: fix perf regression with many packs Johannes Schindelin via GitGitGadget
2026-08-12 19:51 ` Junio C Hamano
2026-08-12 21:29 ` Jeff King
2026-08-13 7:35 ` Patrick Steinhardt [this message]
2026-08-13 8:25 ` Johannes Schindelin
2026-08-13 8:26 ` Johannes Schindelin
2026-08-12 22:29 ` Ben Knoble
2026-08-13 9:04 ` Johannes Schindelin
2026-08-13 11:18 ` Ben Knoble
2026-08-13 7:35 ` Patrick Steinhardt
2026-08-13 9:20 ` Johannes Schindelin
2026-08-13 10:01 ` Patrick Steinhardt
2026-08-13 10:42 ` [PATCH] packfile: fix perf regression with many packsy Johannes Schindelin
2026-08-13 11:12 ` Patrick Steinhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=an1z3uy7Xtqw3U_l@pks.im \
--to=ps@pks.im \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=gitster@pobox.com \
--cc=johannes.schindelin@gmx.de \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox