Thread View: linux.kernel.git
1 messages
1 total messages
Started by Derrick Stolee
Mon, 16 Nov 2026 13:43
Re: [PATCH 2/2] builtin/repo: don't fully parse trees
Author: Derrick Stolee
Date: Mon, 16 Nov 2026 13:43
Date: Mon, 16 Nov 2026 13:43
23 lines
11946 bytes
11946 bytes
On 11/13/2026 6:46 AM, Patrick Steinhardt wrote: > When the rev walk hits a tree object we read its content and then parse > it via `parse_object_buffer()`. This requires us to perform some extra > bookkeeping that is ultimately unnecessary as we keep those trees in > memory. > > The only thing that we need the tree object's content for is so that we > can count its entries. But that can easily be done without having a > parsed tree object, all we need is its content. > > Refactor the code accordingly, which gives us another significant > speedup when executing `git repo structure` in "git.git": > Memory 3.4 GiB ± 0.0 GiB 3.4 GiB … 3.4 GiB > Memory 0.7 GiB ± 0.0 GiB 0.7 GiB … 0.7 GiB -80.4% (5.1x less) This is an impressive memory reduction! Very nice. (I'd comment on v2, but my email host must have bounced those.0 Thanks, -Stolee
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads