hg branches performance regression

Steven Brown stevengbrown at gmail.com
Wed Apr 25 09:10:12 CDT 2012


This changeset makes "hg branches" slower on a branchy repo:

changeset:   16439:e5750c6716eb
user:        Matt Mackall <mpm at selenic.com>
date:        Fri Apr 13 21:35:48 2012 -0500
summary:     revlog: increase readahead size

Before:
$ time ./hg branches -R ../10k > /dev/null
real	0m4.225s
user	0m3.132s
sys	0m0.960s

After:
$ time ./hg branches -R ../10k > /dev/null
real	0m19.068s
user	0m3.768s
sys	0m15.265s

where ../10k is a local clone of https://bitbucket.org/mg/10k with an
existing .hg/cache/branchheads file.

Caching the closed state of the branch heads fixes this, but I don't
yet have a finished patch ready, and it doesn't seem appropriate for
the stable branch anyway.

Is it OK to back out this change for the 2.2 release and revisit it afterwards?


More information about the Mercurial-devel mailing list