[PATCH 5 of 5 V4] dirstate: make non-normal map usable by other modules
Laurent Charignon
lcharignon at fb.com
Thu Dec 17 13:34:28 CST 2015
# HG changeset patch
# User Laurent Charignon <lcharignon at fb.com>
# Date 1450380728 28800
# Thu Dec 17 11:32:08 2015 -0800
# Node ID 6aa847747b7fff8f692d4d9ae887746293988e7e
# Parent ac311ab87a9d526df06d6c4c78ff8ab782460b98
dirstate: make non-normal map usable by other modules
This patch adds a new property to the dirstate for the non-normal map (map
for non-normal files). It makes the non-normal map usable outside of the
dirstate module.
I tested the whole series with hgwatchman against mozilla central with the perf
contrib extensions. For this test I had to modify hgwatchman to use the
non-normal map.
These are the results for hg perfstatus (86x improvement):
With the hgwatchman change and non-normal map
! wall 0.007389 comb 0.000000 user 0.000000 sys 0.000000 (best of 256)
Without the non-normal map
! wall 0.642929 comb 0.640000 user 0.380000 sys 0.260000 (best of 3)
With the changes, on mozilla-central, hg status goes from 0.7s to 0.2s on my
laptop.
diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -119,6 +119,11 @@ class dirstate(object):
return self._copymap
@propertycache
+ def nonnormalmap(self):
+ self._read()
+ return self._nonnormalmap
+
+ @propertycache
def _filefoldmap(self):
try:
makefilefoldmap = parsers.make_file_foldmap
More information about the Mercurial-devel
mailing list