From: Junio C Hamano <gitster@pobox.com>
To: Eric Wong <e@80x24.org>
Cc: Jeff King <peff@peff.net>, git@vger.kernel.org
Subject: Re: [PATCH] cat-file: reduce write calls for unfiltered blobs
Date: Fri, 21 Jun 2024 12:45:28 -0700 [thread overview]
Message-ID: <xmqqiky2jd0n.fsf@gitster.g> (raw)
In-Reply-To: <20240621194221.M879537@dcvr> (Eric Wong's message of "Fri, 21 Jun 2024 19:42:21 +0000")
Eric Wong <e@80x24.org> writes:
> 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.
prev parent reply other threads:[~2024-06-21 19:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-21 2:04 [PATCH] cat-file: reduce write calls for unfiltered blobs Eric Wong
2024-06-21 6:29 ` Jeff King
2024-06-21 13:24 ` Phillip Wood
2024-06-21 15:25 ` Phillip Wood
2024-06-21 19:42 ` Eric Wong
2024-06-21 19:45 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqiky2jd0n.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=e@80x24.org \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox