Good riddance to the lazy index!
Matt Mackall
mpm at selenic.com
Wed Jan 12 17:55:44 UTC 2011
** 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
As it happens, most of that .266 for building the index can also be
eliminated. The bulk of it is allocating and building the approximately
2M Python objects needed to represent the index; the time to just read
the full index is about .013 seconds. Using a list-like extension object
to parse entries from an in-memory index would be more than 10x faster.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel
mailing list