git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] speed up reflog unreachability pruning
@ 2009-03-31 17:03 Linus Torvalds
  2009-03-31 17:09 ` [PATCH 1/2] Clean up reflog unreachability pruning decision Linus Torvalds
  0 siblings, 1 reply; 6+ messages in thread
From: Linus Torvalds @ 2009-03-31 17:03 UTC (permalink / raw)
  To: Junio C Hamano, Git Mailing List


Ok, this is a two-patch series that first tries to clean things up a bit, 
and then applies Junio's approach to speed up the reachability test.

The reason I did it this way is that I think we can improve on the 
reachability logic a bit more, but in order to do that I refuse to work 
with the crazy duplicated complex logic inside 'expire_reflog_ent()', and 
I wanted to abstract it out.

Then, the first cut at speedup is just Junio's approach. Which is fairly 
hacky, but works.

I'd _like_ to do more of a "dynamically do 'mark_reachable()' only when 
necessary" thing, but that's a separate cleanup thing.

As is, this improves the reflog expire quite enormously for me:

 - before:

	[torvalds@nehalem linux]$ time git reflog expire --all
	real	0m37.193s
	user	0m37.174s
	sys	0m0.020s

 - after:

	[torvalds@nehalem linux]$ time ~/git/git reflog expire --all
	real	0m1.693s
	user	0m1.672s
	sys	0m0.020s

although I do suspect that the 'mark_reachable()' could slow things down 
in some less extreme cases. But probably never by a huge amount.

Total diffstat:

 builtin-reflog.c |   75 +++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 69 insertions(+), 6 deletions(-)

with the two individual patches coming up next.

			Linus

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

end of thread, other threads:[~2009-03-31 18:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-31 17:03 [PATCH 0/2] speed up reflog unreachability pruning Linus Torvalds
2009-03-31 17:09 ` [PATCH 1/2] Clean up reflog unreachability pruning decision Linus Torvalds
2009-03-31 17:11   ` [PATCH 2/2] Speed up reflog pruning of unreachable commits Linus Torvalds
2009-03-31 17:46     ` Junio C Hamano
2009-03-31 17:58       ` Linus Torvalds
2009-03-31 17:44   ` [PATCH 1/2] Clean up reflog unreachability pruning decision Junio C Hamano

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