[PATCH 1 of 2] parsers: incrementally parse the revlog index in C

Matt Mackall mpm at selenic.com
Thu Apr 5 15:00:40 CDT 2012


On Wed, 2012-04-04 at 11:58 -0700, Bryan O'Sullivan wrote:
> On Thu, Mar 29, 2012 at 12:51 PM, Matt Mackall <mpm at selenic.com> wrote:
> 
> > If I pop the changeset without recompiling, I get this:
> >
> >  abort: index 00changelog.i is corrupted!
> >
> > ..which is a big headache for bisecting.
> 
> 
> I updated the patch to avoid this. It now returns a tuple with the
> same shape as the old parse_index2.
> 
> >
> > - quick index loads for large indexes are, as predicted, massively
> > faster
> > - retrieving individual entries after load is 5x SLOWER
> 
> 
> The cache that I added seems to have alleviated this problem. But just
> to be sure, how were you measuring this? I want to be sure I've got
> good numbers to report.

I probably hacked something in perf.py to do index[n] over and over. It
was below the measurement accuracy of perf's clock, so I did a loop of
10000.

> perfheads:
> 
> unpatched ! wall 0.104354 comb 0.100000 user 0.100000 sys 0.000000 (best of 94)
>   patched ! wall 0.110689 comb 0.110000 user 0.110000 sys 0.000000 (best of 89)
> 
> perftags:
> 
> unpatched ! wall 0.305407 comb 0.310000 user 0.230000 sys 0.080000 (best of 32)
>   patched ! wall 0.017454 comb 0.010000 user 0.000000 sys 0.010000 (best of 149)

The benchmarks are looking very nice.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list