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

Re: how to keep git-fetch from running out of memory?

From
Shawn Pearce <spearce@spearce.org>
Date
May 15, 2011, 20:37 UTC
Message-ID
<BANLkTi=+k_qh_RzuL73NPnEEcpA=0B8X_Q@mail.gmail.com>
In-Reply-To
<7vboz3pv7x.fsf@alter.siamese.dyndns.org>
On Sun, May 15, 2011 at 13:25, Junio C Hamano <gitster@pobox.com> wrote:
Show 6 quoted lines
> Shawn Pearce <spearce@spearce.org> writes:
>
>> However, that may still be insufficient. A big object must still be
>> allocated in memory in order to compute its SHA-1.
>
> I wonder if we can stream this?

If its a non-delta, yes. We already do this in JGit for blobs over 50M. (Trees, commits and tags are not streamed because we might need to do fsck on them and the fsck code for these object types requires the entire object in a single buffer.)

Its probably not a huge change to index-pack.c. But I haven't dug around in there in a while. I wish I could say I will look at this on Monday, but I don't have the time.

-- 
Shawn.
Previous: Junio C Hamano
Message 4 of 4 in “how to keep git-fetch from running out of memory?”
  1. Kartik AgaramMay 15, 2011
  2. Shawn PearceMay 15, 2011
  3. Junio C HamanoMay 15, 2011
  4. Shawn PearceMay 15, 2011

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.