Good riddance to the lazy index!

Matt Mackall mpm at selenic.com
Tue Jan 18 16:20:08 CST 2011


On Tue, 2011-01-18 at 00:32 -0600, Matt Mackall wrote:
> On Sat, 2011-01-15 at 17:12 +0100, Benoit Boissinot wrote:
> > On Wed, Jan 12, 2011 at 6:55 PM, Matt Mackall <mpm at selenic.com> wrote:
> > > ** You'll need to rebuild your extensions **
> > >
> > > I've just pushed some changes that get rid of the lazy index (that ugly
> > > mass of code at the start of revlog.py) and delay building the nodemap.
> > > As part of this, I've made searching for single nodes use a linear
> > > search back from tip when the nodemap isn't available. This gives a
> > > substantial improvement on a repo with 220k revisions:
> > >
> > >                  old    new
> > > tip              .647   .519
> > > parents          .726   .566   <- very close to tip
> > > log -r ab6eb0   2.108   .650   <- 70k revisions away from tip
> > > log -r c0ffee   2.069   .773   <- non-existent revision
> > > perfindex        .584   .266   <- building the nodemap is expensive

Here's a new column for strategy (3) described below:

tip            .501   <- faster because duplicate lookups are cached
parents        .532
log -r ab6eb0  .674   <- these two show overhead of building cache
log -r c0ffee  .810   <- while scanning
perfindex      .258   <- not sure why this is faster

Rebuilding the branch cache with ~270k revs:

stable:          52.721s
with lazy index: 57.746s
tip:             43.018s

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list