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

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/

Previous: Junio C HamanoNext: Junio C Hamano
Message 14 of 16 in “What's cooking in git.git (Dec 2025, #03)”
  1. Junio C HamanoDec 12, 2025
  2. Adrian RatiuDec 13, 2025
  3. Junio C HamanoDec 16, 2025
  4. Patrick SteinhardtDec 16, 2025
  5. Adrian RatiuDec 16, 2025
  6. Emily ShafferDec 16, 2025
  7. Junio C HamanoDec 17, 2025
  8. René ScharfeDec 13, 2025
  9. Aaron PlattnerDec 17, 2025
  10. Junio C HamanoDec 17, 2025
  11. Aaron PlattnerDec 17, 2025
  12. Jeff KingDec 17, 2025
  13. Junio C HamanoDec 17, 2025
  14. Aaron PlattnerDec 17, 2025
  15. Junio C HamanoDec 18, 2025
  16. Patrick SteinhardtDec 18, 2025

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.