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

Re: [PATCH] cat-file: reduce write calls for unfiltered blobs

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 21, 2024, 19:45 UTC
Message-ID
<xmqqiky2jd0n.fsf@gitster.g>
In-Reply-To
<20240621194221.M879537@dcvr>
Eric Wong <e@80x24.org> writes:
Show 19 quoted lines
> Cool, I'll look into it and probably combining the approaches.
> Optimizations often have a snowballing effect :)
>
>> But anyway, that's a much bigger improvement than what you've got here.
>> It does still require two write() calls, since you'll get the object
>> contents as a separate buffer. But it might be possible to teach
>> object_oid_info_extended() to write into a buffer of your choice (so you
>> could reserve some space at the front to format the metadata into, and
>> likewise you could reuse the buffer to avoid malloc/free for each).
>
> Yeah, that sounds like a good idea.
>
>> I don't know that I'll have time to revisit it in the near future, but
>> if you like the direction feel free to take a look at the patch and see
>> if you can clean it up. (It was written years ago, but I rebase my
>> topics forward regularly and merge them into a daily driver, so it
>> should be in good working order).
>
> Thanks.  I'll try to take a look at it soon.
Thanks, that's an exciting direction to go in.
Previous: Eric Wong
Message 6 of 6 in “cat-file: reduce write calls for unfiltered blobs”
  1. cat-file: reduce write calls for unfiltered blobsEric Wong, Jun 21, 2024
  2. Jeff KingJun 21, 2024
  3. Phillip WoodJun 21, 2024
  4. Phillip WoodJun 21, 2024
  5. Eric WongJun 21, 2024
  6. Junio C HamanoJun 21, 2024

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.