changeset 20075:f8737bce736a

manifest: increase lrucache from 3 to 4 During a commit amend there are 4 manifests being handled: - original commit - temporary commit - amended commit - merge base This causes a manifest cache miss which hurts perf on large repos. On a large repo, this fix causes amend to go from 6 seconds to 5.5 seconds.
author Durham Goode <durham@fb.com>
date Mon, 11 Nov 2013 16:35:12 -0800
parents 5fc2ae1c631b
children 986d09e696ff
files mercurial/manifest.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/manifest.py	Mon Nov 11 16:42:49 2013 -0800
+++ b/mercurial/manifest.py	Mon Nov 11 16:35:12 2013 -0800
@@ -30,8 +30,9 @@
 
 class manifest(revlog.revlog):
     def __init__(self, opener):
-        # we expect to deal with not more than three revs at a time in merge
-        self._mancache = util.lrucachedict(3)
+        # we expect to deal with not more than four revs at a time,
+        # during a commit --amend
+        self._mancache = util.lrucachedict(4)
         revlog.revlog.__init__(self, opener, "00manifest.i")
 
     def parse(self, lines):