git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: Roman Zippel <zippel@linux-m68k.org>,
	Martin Langhoff <martin.langhoff@gmail.com>,
	Tim Harper <timcharper@gmail.com>,
	git@vger.kernel.org
Subject: Re: [PATCH v3-wip] revision traversal: show full history with merge simplification
Date: Thu, 31 Jul 2008 15:26:17 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.1.10.0807311513020.3277@nehalem.linux-foundation.org> (raw)
In-Reply-To: <7vabfxyacx.fsf_-_@gitster.siamese.dyndns.org>



On Thu, 31 Jul 2008, Junio C Hamano wrote:
> 
> The same query with 's/| head -n 1/>/dev/null' is more expensive.  In fact
> it is much more expensive than the non-incremental one (v2), and about
> three times more expensive than non-limiting --full-history for explaining
> the history of kernel/printk.c.

Hmm? Why is that, exactly? Does it walk over the same commit over and over 
and over again or something?

Can you combine --simplify-merges and --topo-order to get a fast version 
again (since --topo-order will force a non-incrmental walk)?

I have this suspicion (gut feel only, not anything else to back it up) 
that for any complex global history, you'll always end up having a lot of 
merges "live" and have a hard time getting a lot of early output. 

That may be why you get a fairly big delay before even the first commit:

> $ time sh -c 'git log --pretty=oneline --abbrev-commit \
>        --simplify-merges --parents \
>        -- kernel/printk.c | head -n 1'
> 5dfb66b... 1d9b9f6... c9272c4... Merge branch 'for-linus' of git://git.o-hand.com/linux-mfd
>
> real    0m0.344s
> user    0m0.324s
> sys     0m0.020s

>From your previous email:

   $ git rev-list --parents --full-history --topo-order HEAD -- kernel/printk.c
   3.75user 0.47system 0:04.22elapsed 100%CPU (0avgtext+0avgdata 0maxresident)k

so that's less than 10% of the whole time, but it's still a _lot_ slower 
than the

   $ git rev-list --parents --full-history HEAD -- kernel/printk.c | head -n 200
   0.16user 0.02system 0:00.18elapsed 103%CPU (0avgtext+0avgdata 0maxresident)k

and that was the first 200 commits, not just the first one.  I bet you got 
the first one in about a tenth of that time - so I'm guessing 0.016s (also 
based on my own testing - it's below 0.01s here, but I'm willing to bet my 
machine is faster than yours is).

So getting the first one with "--simplify-merges" was really a _lot_ 
slower.

That said, I'm a huge beliver in the incremental approach - it just looks 
like this is potentially "just barely incremental" in practice.

Of course, with a more linear history than the kernel, your approach 
probably works better.

			Linus

  reply	other threads:[~2008-07-31 22:30 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-21 20:26 Bizarre missing changes (git bug?) Tim Harper
2008-07-21 20:37 ` Linus Torvalds
2008-07-21 22:53   ` Tim Harper
2008-07-21 22:55     ` Tim Harper
     [not found]   ` <8C23FB54-A28E-4294-ABEA-A5766200768B@gmail.com>
2008-07-21 22:57     ` Linus Torvalds
2008-07-26  3:12   ` Roman Zippel
2008-07-26 19:58     ` Linus Torvalds
2008-07-27 17:50       ` Roman Zippel
2008-07-27 18:47         ` Linus Torvalds
2008-07-27 23:14           ` Roman Zippel
2008-07-27 23:18             ` Linus Torvalds
2008-07-28  0:00               ` Roman Zippel
2008-07-28  5:00                 ` Linus Torvalds
2008-07-28  5:30                   ` Linus Torvalds
2008-07-29  2:59                   ` Roman Zippel
2008-07-29  3:15                     ` Martin Langhoff
2008-07-30  0:16                       ` Roman Zippel
2008-07-30  0:25                         ` Martin Langhoff
2008-07-30  0:32                         ` Linus Torvalds
2008-07-30  0:48                           ` Linus Torvalds
2008-07-30 23:56                             ` Junio C Hamano
2008-07-31  0:15                               ` Junio C Hamano
2008-07-31  0:30                               ` Linus Torvalds
2008-07-31  8:17                               ` [PATCH v2] revision traversal: show full history with merge simplification Junio C Hamano
2008-07-31  8:18                                 ` Junio C Hamano
2008-07-31 22:30                                   ` Linus Torvalds
2008-07-31 22:09                                 ` [PATCH v3-wip] " Junio C Hamano
2008-07-31 22:26                                   ` Linus Torvalds [this message]
2008-07-31 22:36                                     ` Junio C Hamano
2008-08-01  3:00                                     ` Junio C Hamano
2008-08-01  3:48                                       ` Linus Torvalds
2008-08-01  7:50                                         ` Junio C Hamano
2008-07-30  8:36                         ` Bizarre missing changes (git bug?) Jakub Narebski
2008-07-29  3:29                     ` Linus Torvalds
2008-07-29  3:33                       ` Linus Torvalds
2008-07-29 11:39                       ` Roman Zippel
2008-07-29 12:00                         ` David Kastrup
2008-07-29 15:50                         ` Linus Torvalds
2008-07-30  1:14                           ` Roman Zippel
2008-07-30  1:32                             ` Kevin Ballard
2008-07-30  1:49                             ` Linus Torvalds
2008-07-29  5:31                     ` Jeff King
2008-07-29 12:32                       ` Roman Zippel
2008-07-29 12:48                         ` Olivier Galibert
2008-07-29 12:52                         ` Jeff King
2008-07-29 17:25                           ` Linus Torvalds
2008-07-30  1:50                             ` Roman Zippel
2008-07-30  2:05                               ` Linus Torvalds
2008-07-30  4:26                             ` Jeff King
2008-07-30  4:52                               ` Linus Torvalds
2008-07-30  2:48                           ` Roman Zippel
2008-07-30  3:20                             ` Kevin Ballard
2008-07-30  3:21                             ` Linus Torvalds
2008-07-30  3:35                               ` Linus Torvalds
2008-07-30  4:23                             ` Jeff King
2008-07-27 23:25             ` Martin Langhoff
2008-07-28  1:29               ` Roman Zippel
2008-07-21 20:42 ` Alex Riesen

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=alpine.LFD.1.10.0807311513020.3277@nehalem.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=martin.langhoff@gmail.com \
    --cc=timcharper@gmail.com \
    --cc=zippel@linux-m68k.org \
    /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).