git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Start migrating away from the "struct tree_entry" list
@ 2006-05-28 22:03 Linus Torvalds
  2006-05-28 22:07 ` [PATCH 1/4] Add raw tree buffer info to "struct tree" Linus Torvalds
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Linus Torvalds @ 2006-05-28 22:03 UTC (permalink / raw)
  To: Junio C Hamano, Git Mailing List


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-05-28 22:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-28 22:03 [PATCH 0/4] Start migrating away from the "struct tree_entry" list Linus Torvalds
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

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).