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

Re: [PATCH 2/2] index-pack: reduce memory usage when the pack has large blobs

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
Feb 26, 2012, 04:10 UTC
Message-ID
<CACsJy8Cncs8RYiSB0N20vy9zu2NRTTHpfw3rSfmW64i-4_wxSw@mail.gmail.com>
In-Reply-To
<20120225224533.GJ9526@pomac.netswarm.net>
On Sun, Feb 26, 2012 at 5:45 AM, Ian Kumlien <pomac@vapor.com> wrote:
Show 5 quoted lines
> Actually, i added a backtrace and used addr2line to confirm my
> suspicion... which is:
> builtin/index-pack.c:414
>
> ie get_data_from_pack...

That function should only be called when objects are deltified, which should _not_ happen for large blobs. What is its caller?

Show 16 quoted lines
>
> It looks to me like, if we are to support this kind of things, we need a
> slightly different approach - instead of passing the data around, it
> feels like passing a function pointer around would be beneficial.
>
> Looking at the code i see alot of places where this would be a issue,
> just the fact that get_data_from_pack is used in several functions that
> might do some small operation and then just free it.
>
> I understand and recognize that my "problem" is not what git was
> designed for; it was designed for small files, which is very evident in
> how it approaches the data... And I'd most definetly have to look alot
> closer to this code... =)
>
>> --
>> Duy
-- 
Duy
Previous: Ian KumlienNext: Ian Kumlien
Message 10 of 11 in “Skip SHA-1 collision test on "index-pack --verify"”
  1. 1/2 Skip SHA-1 collision test on "index-pack --verify"Nguyễn Thái Ngọc Duy, Feb 24, 2012
  2. 2/2 index-pack: reduce memory usage when the pack has large blobsNguyễn Thái Ngọc Duy, Feb 24, 2012
  3. Ian KumlienFeb 24, 2012
  4. Ian KumlienFeb 24, 2012
  5. Ian KumlienFeb 24, 2012
  6. Ian KumlienFeb 24, 2012
  7. Nguyen Thai Ngoc DuyFeb 25, 2012
  8. Ian KumlienFeb 25, 2012
  9. Ian KumlienFeb 25, 2012
  10. Nguyen Thai Ngoc DuyFeb 26, 2012
  11. Ian KumlienFeb 26, 2012

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.