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

Re: [RFD/PATCH] Implement pack.compression and pack-objects --compression=N

From
Nicolas Pitre <nico@cam.org>
Date
May 4, 2007, 16:30 UTC
Message-ID
<alpine.LFD.0.99.0705041218130.24220@xanadu.home>
In-Reply-To
<56b7f5510705040910i3cac723co3aed45034c097def@mail.gmail.com>
On Fri, 4 May 2007, Dana How wrote:
Show 32 quoted lines
> On 5/4/07, Nicolas Pitre <nico@cam.org> wrote:
> > On Thu, 3 May 2007, Junio C Hamano wrote:
> > 
> > > "Dana How" <danahow@gmail.com> writes:
> > >
> > > > So for a 25% increase in blob size I get 33% less elapsed time
> > > > in git-add, all by changing core.compression from -1 to 1.
> > > > I'll definitely take that improvement.  [For the compressible files
> > > > we typically have, using 0 is a bad idea:  the CPU "advantage"
> > > > is swamped out by the time to write a much larger file.]
> > >
> > > The above number is about loose objects, right?
> > >
> > > > Since I don't care [to the same degree] about the responsiveness of
> > > > packing,  I'd rather pack with -1 or better to keep packs small.
> > >
> > > I see.  You are saying that the fact that core.compression is
> > > used also for packing makes the variable less useful.
> > 
> > I think that would make sense to have separate configs for pack and
> > loose object compression.  When not specified they should simply default
> > to core.compression if it exists.  Otherwise I'd suggest that pack
> > compression default level be Z_DEFAULT_COMPRESSION and loose object
> > compression default level be Z_BEST_SPEED.  This would make interactive
> > operations like git-add and git-commit even faster by default.
> 
> I agree with your Z_BEST_SPEED idea.  I did not include it in
> the patch b/c I didn't want to change any behavior in the absence
> of new config settings.
> 
> Are you actually arguing for *3* different compression-related config
> variables?
Yes.
> How about:
> (a) core.compression controls loose objects. defaults to Z_BEST_SPEED.
> (b) pack.compression controls packing. defaults to Z_DEFAULT_COMPRESSION
> if neither variable exists. defaults to core.compression if only that exists

Yes, although I wouldn't default pack.compression to core.compression if pack.compression doesn't exist. The documentation about core.compression currently talks (wrongly) only about loose objects anyway, so making pack.compression stand on its own won't be that bad.

Nicolas
Previous: Dana HowNext: Dana How
Message 9 of 11 in “Implement pack.compression and pack-objects --compression=N”
  1. Implement pack.compression and pack-objects --compression=NDana How, May 2, 2007
  2. Junio C HamanoMay 2, 2007
  3. Dana HowMay 2, 2007
  4. Dana HowMay 2, 2007
  5. Junio C HamanoMay 4, 2007
  6. Dana HowMay 4, 2007
  7. Nicolas PitreMay 4, 2007
  8. Dana HowMay 4, 2007
  9. Nicolas PitreMay 4, 2007
  10. Dana HowMay 4, 2007
  11. Nicolas PitreMay 4, 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.