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

Re: [PATCH] git-p4: improve performance with large files

From
Han-Wen Nienhuys <hanwen@google.com>
Date
Mar 6, 2009, 01:25 UTC
Message-ID
<1d48f7010903051725v510f99f0h2a05b9381ff75ac1@mail.gmail.com>
In-Reply-To
<7vzlfzwiyn.fsf@gitster.siamese.dyndns.org>

I don't understand the point of trying to save the 32 mb, if people are sending you blobs that are that large.

The approach to avoid sequences of appends looks sound.
On Thu, Mar 5, 2009 at 10:14 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 5 quoted lines
>> ... The ideal solution is to use a generator and refactor the commit
>> handling as a stream. I am working on that but it involves deeper
>> changes, so as I am not sure it will be accepted, I'm providing the
>> attached compromise patch first. At least it solves the appaling speed
>> issue. I tuned it so that it never uses more than 32 MiB extra memory.
>> +            text += ''.join(data)
>> +            del data
i'd say
  data = []

add a comment that you're trying to save memory. There is no reason to remove data from the namespace.

-- 
Han-Wen Nienhuys
Google Engineering Belo Horizonte
hanwen@google.com
Previous: Junio C HamanoNext: Sam Hocevar
Message 6 of 10 in “git-p4: improve performance with large files”
  1. git-p4: improve performance with large filesSam Hocevar, Mar 4, 2009
  2. thestar@fussycoder.id.auMar 4, 2009
  3. Sam HocevarMar 5, 2009
  4. thestar@fussycoder.id.auMar 6, 2009
  5. Junio C HamanoMar 6, 2009
  6. Han-Wen NienhuysMar 6, 2009
  7. Sam HocevarMar 6, 2009
  8. Junio C HamanoMar 6, 2009
  9. git-p4: improve performance with large filesSam Hocevar, Mar 6, 2009
  10. git-p4: improve performance when importing huge files by reducing the number of string concatenations while constraining memory usage.Sam Hocevar, Mar 7, 2009

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.