manifestdict: remove unnecessary dictionary copy
authorBenoit Boissinot <benoit.boissinot@ens-lyon.org>
Thu, 03 Sep 2009 02:42:56 +0200
changeset 9416 eecbaac5ca88
parent 9415 e0cc9fa2a576
child 9417 4c3fb45123e5
manifestdict: remove unnecessary dictionary copy No need to copy the dict, dict.__init__() will do that for us. It was responsible for a non-negligeable waste of time during a qpush of an -mm queue on the kernel repo.
mercurial/manifest.py
--- a/mercurial/manifest.py	Wed Sep 02 21:05:43 2009 +0200
+++ b/mercurial/manifest.py	Thu Sep 03 02:42:56 2009 +0200
@@ -20,7 +20,7 @@
     def set(self, f, flags):
         self._flags[f] = flags
     def copy(self):
-        return manifestdict(dict.copy(self), dict.copy(self._flags))
+        return manifestdict(self, dict.copy(self._flags))
 
 class manifest(revlog.revlog):
     def __init__(self, opener):