# HG changeset patch # User Siddharth Agarwal # Date 1414922465 28800 # Node ID 46cec117dda24ba5b237491369519b193756eb08 # Parent 05aea77371a3abfd16e3951e75f06528b7e75072 maps.RevMap: disable GC while loading the revmap The revmap load process creates lots of tiny objects. With just the bare minimum Mercurial runtime, loading a million-file revmap goes from 6.83 seconds to 6.28. For longer running processes (e.g. hg push a series of changes) the difference will probably be dramatic. diff --git a/hgsubversion/maps.py b/hgsubversion/maps.py --- a/hgsubversion/maps.py +++ b/hgsubversion/maps.py @@ -220,6 +220,7 @@ class RevMap(dict): raise hgutil.Abort('revmap too new -- please upgrade') return f + @util.gcdisable def _load(self): for l in self.readmapfile(self.meta.revmap_file): revnum, ha, branch = l.split(' ', 2)