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

Re: gc --aggressive

From
Nicolas Pitre <nico@fluxnic.net>
Date
May 1, 2012, 17:59 UTC
Message-ID
<alpine.LFD.2.02.1205011348090.21030@xanadu.home>
In-Reply-To
<20120501171640.GA16623@sigill.intra.peff.net>
On Tue, 1 May 2012, Jeff King wrote:
Show 20 quoted lines
> On Tue, May 01, 2012 at 12:28:06PM -0400, Jeff King wrote:
> 
> > >  You could test this theory by commenting out the size comparisons in 
> > > type_size_sort() and re-run the test.
> > 
> > I'll try this next.
> 
> Wow, it behaves horribly. I didn't even let the bigger tests run to
> completion. Here is the output for git.git (the first line is from the
> original, unmodified version of git with --window=10):
> 
>   orig | 31.4M (100%) |   54s (100%)
>     10 | 44.0M (140%) |  169s (310%)
>     20 | 37.7M (120%) |  232s (428%)
>     40 | 33.6M (107%) |  331s (608%)
>     80 | 30.9M ( 99%) |  473s (868%)
>    160 | 29.4M ( 94%) |  696s (1279%)
> 
> Unless the window is increased a lot, the packs end up quite a bit
> larger (and even still we spend a lot more CPU time).
Bleh.  Allright.

One final quick test if you feel like it: I've never been sure that the last comparison in type_size_sort() is correct. Maybe it should be the other way around. Currently it reads:

	return a < b ? -1 : (a > b);

While keeping the size comparison commented out, you could try to replace this line with:

	return b < a ? -1 : (b > a);

If this doesn't improve things then it would be clear that this avenue should be abandoned.

Nicolas
Previous: Jeff KingNext: Junio C Hamano
Message 11 of 26 in “gc --aggressive”
  1. Jay SoffianApr 17, 2012
  2. Jay SoffianApr 17, 2012
  3. Matthieu MoyApr 17, 2012
  4. Jeff KingApr 17, 2012
  5. Jeff KingApr 28, 2012
  6. Nicolas PitreApr 28, 2012
  7. Jeff KingApr 29, 2012
  8. Nicolas PitreApr 29, 2012
  9. Jeff KingMay 1, 2012
  10. Jeff KingMay 1, 2012
  11. Nicolas PitreMay 1, 2012
  12. Junio C HamanoMay 1, 2012
  13. Nicolas PitreMay 1, 2012
  14. Jeff KingMay 1, 2012
  15. Jeff KingMay 1, 2012
  16. Nicolas PitreMay 1, 2012
  17. Nicolas PitreMay 1, 2012
  18. Jeff KingMay 1, 2012
  19. Nicolas PitreMay 1, 2012
  20. Nicolas PitreApr 28, 2012
  21. Jeff KingApr 17, 2012
  22. Junio C HamanoApr 17, 2012
  23. Jeff KingApr 17, 2012
  24. Junio C HamanoApr 17, 2012
  25. Nicolas PitreApr 28, 2012
  26. Andreas EricssonApr 18, 2012

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.