# HG changeset patch # User Siddharth Agarwal # Date 1364939431 25200 # Node ID 887b75fda1695b2690220913e8ffd0a362aaec18 # Parent 1b70e5941ad7cefbcf045e8dade0f7f87bc3a400 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. diff -r 1b70e5941ad7 -r 887b75fda169 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):