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

Re: [PATCH] Add --no-reuse-delta option to git-gc

From
Steven Grimm <koreth@midwinter.com>
Date
May 9, 2007, 09:02 UTC
Message-ID
<46418E24.9020309@midwinter.com>
In-Reply-To
<7v3b26xvjo.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano wrote:
Show 5 quoted lines
> I think that sounds saner and more user friendly than specific
> knob to tune "window", "depth" and friends which are too
> technical.  It has an added attraction that we can redefine what
> exactly "hard" means later.
>   

On that note, has any thought been given to looking at other compression algorithms? Gzip is a great high-speed compressor, but there are others out there (some a bit slower, some much slower at both compression and decompression) that produce substantially smaller output.

One could even, if one were in a particularly twisted state of mind, envision using CPU-intensive compression for less frequently-accessed objects and using gzip for active ones, on the theory that the best time/space tradeoff is not uniform across all the objects in a git repository. Presumably most of us never actually unpack the vast majority of objects in a git repository of reasonable age, so the fact that it'd take a little longer if we *did* want to unpack them isn't much of a downside compared to the upside of reclaiming disk space. That would mitigate the impact of using an algorithm that's slow at decompression.

I think it'd be kind of neat to have my .git directory shrink by another 20+%. That's conservative; on maximumcompression.com's test of a mix of different file types including images, gzip compresses 64% and the best-scoring one does 80%. On English text gzip does 71% and the top scorer does 89%. Most of the top-tier compressors are proprietary, but there are some open-source ones that do pretty well.

Maybe not worth the added complexity, but I thought I'd toss it out there. It probably makes more sense (if it makes any at all) after Linus's suggestion to not unpack after cloning is in place. Once the upstream has gone to the trouble of CPU-intensive compressing, you certainly don't want to force clones to have to spend the time repeating the same work.

-Steve (who suspects this is a "yes, we talked this over early in git's history" question, but what the heck)

Previous: Junio C HamanoNext: Johannes Schindelin
Message 12 of 40 in “Add --no-reuse-delta, --window, and --depth options to git-gc”
  1. Add --no-reuse-delta, --window, and --depth options to git-gcTheodore Ts'o, May 8, 2007
  2. Nicolas PitreMay 8, 2007
  3. Theodore TsoMay 8, 2007
  4. Dana HowMay 8, 2007
  5. Junio C HamanoMay 8, 2007
  6. Theodore Ts'oMay 8, 2007
  7. Add pack.depth option to git-pack-objects and change default depth to 50Theodore Ts'o, May 8, 2007
  8. Add --no-reuse-delta option to git-gcTheodore Ts'o, May 8, 2007
  9. Nicolas PitreMay 8, 2007
  10. Daniel BarkalowMay 9, 2007
  11. Junio C HamanoMay 9, 2007
  12. Steven GrimmMay 9, 2007
  13. Johannes SchindelinMay 9, 2007
  14. Junio C HamanoMay 9, 2007
  15. Shawn O. PearceMay 9, 2007
  16. Sam VilainJun 10, 2007
  17. Nicolas PitreJun 11, 2007
  18. Steven GrimmJun 11, 2007
  19. Shawn O. PearceJun 11, 2007
  20. Johannes SchindelinJun 11, 2007
  21. Nicolas PitreJun 11, 2007
  22. Johannes SchindelinJun 11, 2007
  23. Add --aggressive option to 'git gc'Theodore Tso, May 9, 2007
  24. Junio C HamanoMay 9, 2007
  25. Theodore TsoMay 9, 2007
  26. Junio C HamanoMay 10, 2007
  27. Nicolas PitreMay 8, 2007
  28. Theodore TsoMay 8, 2007
  29. Johannes SchindelinMay 8, 2007
  30. Theodore TsoMay 8, 2007
  31. Nicolas PitreMay 8, 2007
  32. Theodore TsoMay 9, 2007
  33. Johannes SchindelinMay 9, 2007
  34. Dana HowMay 8, 2007
  35. Nicolas PitreMay 8, 2007
  36. Junio C HamanoMay 9, 2007
  37. Nicolas PitreMay 8, 2007
  38. Junio C HamanoMay 8, 2007
  39. Nicolas PitreMay 8, 2007
  40. Nicolas PitreMay 8, 2007

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.