[PATCH 0 of 4] optimise dirstate.walk
Simon Heimberg
simohe at besonet.ch
Tue May 19 02:26:49 CDT 2009
#1 is not a (big) gain in time, but it is consequent use of variables
#2 skips some unnecessary stat calls and is mandatory for #3
#3 only executes Step 3 (and 2) of dirstate.walk when it is necessary
#4 should be a little bit quicker (set instead of list) and needs a litte
bit less memory (No timing results, there is no test in perf.)
Timing:
value wall for calling "hg perfwalk mercurial/dirstate.py"
without patches: 0.007565
with Patches 1..3: 0.0001
This is about 70 times faster!
For checking the dirstate of the entire repo, a directory or a nonexisting
file, the time is the same as before.
More timing results: http://www.selenic.com/mercurial/wiki/SimonHeimberg
Tests:
Test suite passes
Greetings,
Simon
More information about the Mercurial-devel
mailing list