"hg log -q" performance (was: API question: ancestors of B that are not ancestors of A)

Matt Mackall mpm at selenic.com
Wed Dec 9 16:58:42 CST 2009


On Wed, 2009-12-09 at 17:53 -0500, Greg Ward wrote:
> On Wed, Dec 9, 2009 at 5:34 PM, Matt Mackall <mpm at selenic.com> wrote:
> >>   $ time hg log --follow -q -rtip:0 -P 104325
> >>   104339:cf603b1018fb
> >>   104336:9d06300772ae
> >>   [...several hundred more...]
> >>   101660:7f617f192df1
> >>   hg log --follow -q -rtip:0 -P 104325  128.85s user 0.50s system 98%
> >> cpu 2:11.68 total
> >
> > Hmm, that's odd. We can probably improve that. How long do 'hg log -q
> >> /dev/null' take?
> 
> "hg log -q > /dev/null": ~47 sec, 99% cpu.
> "hg log --follow -q > /dev/null": ~108 sec, 99% cpu.
> 
> So I profiled "log -q" of the last ~24000 changesets:
> 
> """
> time hg --profile log -q -r 80000:tip > /dev/null
>    CallCount    Recursive    Total(ms)   Inline(ms) module:lineno(function)
>        24340            0     17.5399      1.8263   mercurial.cmdutil:805(_show)
>       +24340            0      4.7440      0.3199
> +mercurial.templatefilters:11(stringify)

Templates, eh?

I've got a 160k cset repo that does log -q in 11s. -qf takes 1m18,


-- 
http://selenic.com : development and support for Mercurial and Linux




More information about the Mercurial-devel mailing list