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

Re: git-fetching from a big repository is slow

From
Shawn Pearce <spearce@spearce.org>
Date
Dec 14, 2006, 23:29 UTC
Message-ID
<20061214232936.GH26202@spearce.org>
In-Reply-To
<Pine.LNX.4.63.0612150013390.3635@wbgn013.biozentrum.uni-wuerzburg.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 16 quoted lines
> On Thu, 14 Dec 2006, Shawn Pearce wrote:
> > Geert Bosch <bosch@adacore.com> wrote:
> > >    if (compressed_size > expanded_size / 4 * 3 + 1024) {
> > >      /* don't try to deltify if blob doesn't compress well */
> > >      return ...;
> > >    }
> > 
> > And yet I get good delta compression on a number of ZIP formatted files 
> > which don't get good additional zlib compression (<3%). Doing the above 
> > would cause those packfiles to explode to about 10x their current size.
> 
> A pity. Geert's proposition sounded good to me.
> 
> However, there's got to be a way to cut short the search for a delta 
> base/deltification when a certain (maybe even configurable) amount of time 
> has been spent on it.
I'm not sure time is the best rule there.

Maybe if the object is large (e.g. over 512 KiB or some configured limit) and did not compress well when we last deflated it (e.g. Geert's rule above) then only try to delta it against another object whose hinted filename is very close/exactly matches and whose size is very close, and don't make nearly as many attempts on the matching hunks within any two files if the file appears to be binary and not text.

I'm OK with a small increase in packfile size as a result of slightly less optimal delta base selection on the really large binary files due to something like the above, but 10x is insane.

Previous: Johannes SchindelinNext: Johannes Schindelin
Message 4 of 11 in “Re: git-fetching from a big repository is slow”
  1. Shawn PearceDec 14, 2006
  2. Geert BoschDec 14, 2006
  3. Johannes SchindelinDec 14, 2006
  4. Shawn PearceDec 14, 2006
  5. Johannes SchindelinDec 15, 2006
  6. Shawn PearceDec 15, 2006
  7. Nicolas PitreDec 15, 2006
  8. Horst H. von BrandDec 14, 2006
  9. Shawn PearceDec 14, 2006
  10. PazuDec 15, 2006
  11. Robin RosenbergDec 16, 2006

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.