# HG changeset patch # User Alexis S. L. Carvalho # Date 1140871480 -3600 # Node ID 8a7a24b96697649736ebb7e71252f7abd3975a5a # Parent 38e19b1d3de8e88b302725e55cb715fb69a38ae2 speed up hg log --debug hg repo: before: real 0m6.998s user 0m6.952s sys 0m0.046s after: real 0m3.884s user 0m3.839s sys 0m0.042s diff -r 38e19b1d3de8 -r 8a7a24b96697 mercurial/localrepo.py --- a/mercurial/localrepo.py Fri Feb 24 20:25:18 2006 +0100 +++ b/mercurial/localrepo.py Sat Feb 25 13:44:40 2006 +0100 @@ -519,6 +519,12 @@ del mf[fn] return mf + if node1: + # read the manifest from node1 before the manifest from node2, + # so that we'll hit the manifest cache if we're going through + # all the revisions in parent->child order. + mf1 = mfmatches(node1) + # are we comparing the working directory? if not node2: if not wlock: @@ -557,8 +563,6 @@ # flush lists from dirstate before comparing manifests modified, added = [], [] - mf1 = mfmatches(node1) - for fn in mf2: if mf1.has_key(fn): if mf1[fn] != mf2[fn] and (mf2[fn] != "" or fcmp(fn, mf1)):