Re: What's cooking in git.git (Dec 2025, #03)
From: Aaron Plattner <hidden>
Date: 2025-12-17 21:01:21
On 12/12/25 2:26 AM, Junio C Hamano wrote:
* 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
+ 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: [ref]
[1] https://lore.kernel.org/git/20251209014900.402637-1-aplattner@nvidia.com/T/ (local)