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

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

From
Jeff King <peff@peff.net>
Date
Aug 13, 2026, 16:10 UTC
Message-ID
<20260813161036.GA1386479@coredump.intra.peff.net>
In-Reply-To
<ed5c651f-648f-f58c-bbd3-3db295515913@gmx.de>
On Thu, Aug 13, 2026 at 10:25:25AM +0200, Johannes Schindelin wrote:
Show 12 quoted lines
> > > > +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.

Yes, though the regression your patch fixes is about creating the initial pack list, so it happens whether we open each pack or not.

We do test multiple cases earlier in the file where we look at each object (both a stock rev-list, and one where we abbreviate, looking for perf problems in the shortening code itself). But we only do that for 1/50/1000 packs, not the big 10,000 pack case.

I dunno. It probably is not hurting much to have some redundancy in the tests because this one in particular is not too expensive to run. So I am OK either way.

-Peff
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 6 of 24 in “packfile: fix perf regression with many packs”
  1. packfile: fix perf regression with many packsJohannes Schindelin via GitGitGadget, Aug 12, 2026
  2. Junio C HamanoAug 12, 2026
  3. Jeff KingAug 12, 2026
  4. Patrick SteinhardtAug 13, 2026
  5. Johannes SchindelinAug 13, 2026
  6. Jeff KingAug 13, 2026
  7. Johannes SchindelinAug 13, 2026
  8. Ben KnobleAug 12, 2026
  9. Johannes SchindelinAug 13, 2026
  10. Ben KnobleAug 13, 2026
  11. Patrick SteinhardtAug 13, 2026
  12. Johannes SchindelinAug 13, 2026
  13. Patrick SteinhardtAug 13, 2026
  14. Johannes SchindelinAug 13, 2026
  15. Patrick SteinhardtAug 13, 2026
  16. Junio C HamanoAug 13, 2026
  17. Jeff KingAug 13, 2026
  18. Patrick SteinhardtAug 14, 2026
  19. Jeff KingAug 14, 2026
  20. Patrick SteinhardtAug 17, 2026
  21. Jeff KingAug 17, 2026
  22. packfile: fix perf regression with many packsJohannes Schindelin via GitGitGadget, Aug 13, 2026
  23. Patrick SteinhardtAug 14, 2026
  24. Junio C HamanoAug 14, 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.