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

Re: [PATCH 1/3] builtin-pack-objects: don't fail, if delta is not possible

From
Shawn O. Pearce <spearce@spearce.org>
Date
May 29, 2007, 02:53 UTC
Message-ID
<20070529025349.GD7044@spearce.org>
In-Reply-To
<alpine.LFD.0.99.0705282243280.11491@xanadu.home>
Nicolas Pitre <nico@cam.org> wrote:
Show 12 quoted lines
> On Mon, 28 May 2007, Martin Koegler wrote:
> 
> > If builtin-pack-objects runs out of memory while finding
> > the best deltas, it bails out with an error.
> > 
> > If the delta index creation fails (because there is not enough memory),
> > we can downgrade the error message to a warning and continue with the
> > next object.
> 
> In the same vain, there is one realloc() that was turned into a 
> xrealloc() in diff-delta.c.  I think this was a mistake and should 
> probably be a non fatal realloc again to let the caller go on.

And if those two calls fail to alloc their memory, they might want to try calling the pack window gc thingy (release_pack_memory(need, -1)) and then retry the alloc before they fail the delta generation. Its possible that we are better off releasing the LRU pack window and produce the delta, then to fail because we're hanging onto some mmap we don't need...

And actaully release_pack_memory could get more aggressive now that the index_data can be lazily loaded. We could actually unload LRU indexes too.

-- 
Shawn.
Previous: Nicolas Pitre
Message 6 of 6 in “builtin-pack-objects: don't fail, if delta is not possible”
  1. 1/3 builtin-pack-objects: don't fail, if delta is not possibleMartin Koegler, May 28, 2007
  2. 2/3 git-pack-objects: cache small deltas between big objectsMartin Koegler, May 28, 2007
  3. 3/3 builtin-pack-object: cache small deltasMartin Koegler, May 28, 2007
  4. Dana HowMay 29, 2007
  5. Nicolas PitreMay 29, 2007
  6. Shawn O. PearceMay 29, 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.