public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Aaron Plattner <aplattner@nvidia•com>
To: Junio C Hamano <gitster@pobox•com>,
	git@vger•kernel.org, Patrick Steinhardt <ps@pks•im>
Subject: Re: What's cooking in git.git (Dec 2025, #03)
Date: Wed, 17 Dec 2025 12:26:58 -0800	[thread overview]
Message-ID: <f4ba7e89-4717-4b36-921f-56537131fd69@nvidia.com> (raw)
In-Reply-To: <xmqq4ipwc7y2.fsf@gitster.g>

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: <20251123-b4-pks-odb-read-stream-v3-0-1a129182822b@pks•im>
[1] 
https://lore.kernel.org/git/20251209014900.402637-1-aplattner@nvidia.com/T/

  parent reply	other threads:[~2025-12-17 21:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-12 10:26 What's cooking in git.git (Dec 2025, #03) Junio C Hamano
2025-12-13  7:42 ` Adrian Ratiu
2025-12-16  1:59   ` Junio C Hamano
2025-12-16  8:13     ` Patrick Steinhardt
2025-12-16 10:41       ` Adrian Ratiu
2025-12-16 17:49         ` Emily Shaffer
2025-12-17  5:04           ` Junio C Hamano
2025-12-13 18:45 ` René Scharfe
2025-12-17  0:09 ` Aaron Plattner
2025-12-17  5:02   ` Junio C Hamano
2025-12-17  5:20     ` Aaron Plattner
2025-12-17  6:18       ` Jeff King
2025-12-17 13:46       ` Junio C Hamano
2025-12-17 20:26 ` Aaron Plattner [this message]
2025-12-18  2:57   ` Junio C Hamano
2025-12-18  6:22     ` Patrick Steinhardt

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=f4ba7e89-4717-4b36-921f-56537131fd69@nvidia.com \
    --to=aplattner@nvidia$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitster@pobox$(echo .)com \
    --cc=ps@pks$(echo .)im \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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