diff -r ce315b1fc9a7 -r 436a6a31df38 contrib/perf.py --- a/contrib/perf.py Tue Oct 08 01:46:57 2019 -0400 +++ b/contrib/perf.py Tue Oct 08 01:57:10 2019 -0400 @@ -1112,11 +1112,13 @@ timer, fm = gettimer(ui, opts) b"a" in repo.dirstate + def setup(): + repo.dirstate.invalidate() + def d(): - repo.dirstate.invalidate() b"a" in repo.dirstate - timer(d) + timer(d, setup=setup) fm.end()