Re: What's cooking in git.git (Dec 2025, #03)
- From
Aaron Plattner <aplattner@nvidia.com>
- Date
- Dec 17, 2025, 20:26 UTC
- Message-ID
- <f4ba7e89-4717-4b36-921f-56537131fd69@nvidia.com>
- In-Reply-To
- <xmqq4ipwc7y2.fsf@gitster.g>
On 12/12/25 2:26 AM, Junio C Hamano wrote:
Show 11 quoted lines
> * ps/object-read-stream (2025-11-23) 20 commits > (merged to 'next' on 2025-12-09 at c8d645f8ea) > + streaming: drop redundant type and size pointers > + streaming: move into object database subsystem > + streaming: refactor interface to be object-database-centric > + streaming: move logic to read packed objects streams into backend > + streaming: move logic to read loose objects streams into backend > + streaming: make the `odb_read_stream` definition public > + streaming: get rid of `the_repository` > + streaming: rely on object sources to create object stream > + packfile: introduce function to read object info from a store
This commit seems to have caused a slowdown in commit performance. On my production codebase (the one from [1] with the ridiculously enormous promisor pack), a simple commit that touches 9 files (out of 232,259 total in the tree) goes from 0.38 seconds to 1508 seconds.
I'm pretty sure the problem is when do_oid_object_info_extended() substitutes the blank oi here:
if (!oi) oi = &blank_oi;
and then packfile_store_read_object_info() compares it to its own local blank oi:
static struct object_info blank_oi = OBJECT_INFO_INIT;
[...]
/* * We know that the caller doesn't actually need the * information below, so return early. */ if (oi == &blank_oi) return 0;
Here it's comparing the oi parameter to the address of a local static variable instead of the one from the caller, and the condition is always false.
-- Aaron
Show 17 quoted lines
> + streaming: move zlib stream into backends > + streaming: create structure for filtered object streams > + streaming: create structure for packed object streams > + streaming: create structure for loose object streams > + streaming: create structure for in-core object streams > + streaming: allocate stream inside the backend-specific logic > + streaming: explicitly pass packfile info when streaming a packed object > + streaming: propagate final object type via the stream > + streaming: drop the `open()` callback function > + streaming: rename `git_istream` into `odb_read_stream` > + Merge branch 'ps/object-source-loose' into ps/object-read-stream > > The "git_istream" abstraction has been revamped to make it easier > to interface with pluggable object database design. > > Will merge to 'master'. > source: <20251123-b4-pks-odb-read-stream-v3-0-1a129182822b@pks.im>
[1] https://lore.kernel.org/git/20251209014900.402637-1-aplattner@nvidia.com/T/