From: Linus Torvalds <torvalds@osdl.org>
To: Junio C Hamano <junkio@cox.net>, Git Mailing List <git@vger.kernel.org>
Subject: [PATCH 0/4] Start migrating away from the "struct tree_entry" list
Date: Sun, 28 May 2006 15:03:49 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0605281453460.5623@g5.osdl.org> (raw)
The old "tree.h" parsing logic (before I did the "tree-walk" tree buffer
parser) would generate a list of "struct tree_entry" objects, which was
basically a simpler-to-walk version of the raw tree buffer.
Now, the problem with that simpler-to-walk version is that it's a lot less
efficient than just walking the raw tree buffer in-place, and a lot of the
core git tree walkers already use the much more efficient in-place
tree-walker interfaces. Which means that we have _two_ independent ways of
walking the tree. Very annoying.
This series of four patches (on top of my trivial memory leak fix for git
rev-list) gets rid of the tree-entry list from tree parsing, and converts
most users over to use the tree-walker, and has a small compatibility
helper function to keep some users that are hard to convert using what is
now obviously just a temporary list.
Apart from being one more step in the direction of cleaning up tree
walking, it also makes things more efficient, by not needlessly creating
that silly list that most users don't actually want. I used the same test
vector as I did for the git rev-list leaker: doing a
git-rev-list --all --objects
on the historical kernel archive (that one has 566k objects and is more
than twice the size of the current kernel git tree). The series brings
that down from
74.67user 0.45system 1:15.43elapsed
to
62.50user 0.41system 1:02.93elapsed
for me.
NOTE! I think the git-rev-list leak fix can go into the main tree
immediately, but this series should probably be kept in "next" for a
while, just to verify that it all is good..
Linus
next reply other threads:[~2006-05-28 22:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-28 22:03 Linus Torvalds [this message]
2006-05-28 22:07 ` [PATCH 1/4] Add raw tree buffer info to "struct tree" Linus Torvalds
2006-05-28 22:10 ` [PATCH 2/4] Make "tree_entry" have a SHA1 instead of a union of object pointers Linus Torvalds
2006-05-28 22:11 ` [PATCH 3/4] Switch "read_tree_recursive()" over to tree-walk functionality Linus Torvalds
2006-05-28 22:13 ` [PATCH 4/4] Remove "tree->entries" tree-entry list from tree parser Linus Torvalds
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=Pine.LNX.4.64.0605281453460.5623@g5.osdl.org \
--to=torvalds@osdl.org \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
/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;
as well as URLs for NNTP newsgroup(s).