--- a/contrib/perf.py Wed Mar 14 01:13:45 2012 +0100
+++ b/contrib/perf.py Thu Mar 15 13:11:03 2012 -0500
@@ -46,7 +46,7 @@
timer(lambda: sum(map(len, repo.status())))
def perfheads(ui, repo):
- timer(lambda: len(repo.changelog.heads()))
+ timer(lambda: len(repo.changelog.headrevs()))
def perftags(ui, repo):
import mercurial.changelog, mercurial.manifest
@@ -84,8 +84,8 @@
mercurial.revlog._prereadsize = 2**24 # disable lazy parser in old hg
n = repo["tip"].node()
def d():
- repo.invalidate()
- repo[n]
+ cl = mercurial.revlog.revlog(repo.sopener, "00changelog.i")
+ cl.rev(n)
timer(d)
def perfstartup(ui, repo):