scmutil.addremove: stop sorting all walk results
authorSiddharth Agarwal <sid0@fb.com>
Tue, 02 Apr 2013 14:50:31 -0700
changeset 18864 887b75fda169
parent 18863 1b70e5941ad7
child 18865 835e9dfd1e49
scmutil.addremove: stop sorting all walk results The only place where the order matters is in printing out added or removed files. We already sort that set. On a large repository with 170,000 files, this speeds up perfaddremove from 2.34 seconds to 2.13.
mercurial/scmutil.py
--- a/mercurial/scmutil.py	Tue Apr 02 10:56:24 2013 -0700
+++ b/mercurial/scmutil.py	Tue Apr 02 14:50:31 2013 -0700
@@ -678,7 +678,7 @@
     ctx = repo[None]
     dirstate = repo.dirstate
     walkresults = dirstate.walk(m, sorted(ctx.substate), True, False)
-    for abs in sorted(walkresults):
+    for abs in walkresults:
         st = walkresults[abs]
         dstate = dirstate[abs]
         if dstate == '?' and audit_path.check(abs):