From: Patrick Steinhardt <ps@pks.im>
To: Kristofer Karlsson <krka@spotify.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 2/2] builtin/repo: don't fully parse trees
Date: Mon, 16 Nov 2026 07:39:24 +0100 [thread overview]
Message-ID: <avqlHHo36SDmupF6@pks.im> (raw)
In-Reply-To: <CAL71e4PscLozeuQbwNePkgn=QdDPhE1zqTtuGahnKWDN++B0Hw@mail.gmail.com>
On Fri, Nov 13, 2026 at 03:15:16PM +0100, Kristofer Karlsson wrote:
> On Fri, 13 Nov 2026 at 14:06, Patrick Steinhardt <ps@pks.im> wrote:
> >
> > Benchmark 1: ./git repo structure (commit = HEAD~) (10 runs)
> > mean ± σ min … max
> > Wall Time 9.635 s ± 0.072 s 9.534 s … 9.799 s
> > Memory 3.4 GiB ± 0.0 GiB 3.4 GiB … 3.4 GiB
> >
> > Benchmark 2: ./git repo structure (commit = HEAD) (10 runs)
> > mean ± σ min … max
> > Wall Time 7.676 s ± 0.106 s 7.568 s … 7.823 s -20.3%
> > Memory 0.7 GiB ± 0.0 GiB 0.7 GiB … 0.7 GiB -80.4% (5.1x less)
>
> That's quite a nice memory reduction!
>
> > But besides the speedup, the bigger win here is that we no longer keep
> > these parsed trees in memory at all, which translates in a significant
> > reduction in peak memory usage.
>
> I took a look at this since it is very similar to what I
> recently did for the incremental connectivity check, where
> the tree verifier also reads raw tree buffers instead of
> going through parse_object_buffer(), for the same memory
> reasons (I only needed to track the oids, not the full objects).
>
> Both patches look good to me.
Thanks for your review!
Patrick
next prev parent reply other threads:[~2026-11-16 6:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 11:46 [PATCH 0/2] builtin/repo: improve counting of objects Patrick Steinhardt
2026-11-13 11:46 ` [PATCH 1/2] builtin/repo: only parse objects as needed Patrick Steinhardt
2026-11-13 14:12 ` Kristofer Karlsson
2026-11-16 6:38 ` Patrick Steinhardt
2026-11-16 9:02 ` Kristofer Karlsson
2026-11-13 11:46 ` [PATCH 2/2] builtin/repo: don't fully parse trees Patrick Steinhardt
2026-11-13 14:15 ` Kristofer Karlsson
2026-11-16 6:39 ` Patrick Steinhardt [this message]
2026-11-16 13:43 ` Derrick Stolee
2026-11-16 8:01 ` [PATCH v2 0/2] builtin/repo: improve counting of objects Patrick Steinhardt
2026-11-16 8:01 ` [PATCH v2 1/2] builtin/repo: only parse objects as needed Patrick Steinhardt
2026-11-16 8:01 ` [PATCH v2 2/2] builtin/repo: don't fully parse trees Patrick Steinhardt
2026-11-16 9:07 ` [PATCH v2 0/2] builtin/repo: improve counting of objects Kristofer Karlsson
2026-11-16 16:02 ` Derrick Stolee
2026-11-16 17:32 ` Junio C Hamano
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=avqlHHo36SDmupF6@pks.im \
--to=ps@pks.im \
--cc=git@vger.kernel.org \
--cc=krka@spotify.com \
/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