# HG changeset patch # User Adrian Buehlmann # Date 2012-09-14 11:02:31 # Node ID 5ab863922e0f36351d58c9fa88f833f23c67f470 # Parent 453d790fe0896cb7c62ecd8cc013128b3994fcb4 perf: add perffncacheencode Examples (all done with somewhat dated clones I found on my disk): Netbeans (~120k entries in fncache): $ hg perffncacheencode ! wall 4.338000 comb 4.336828 user 4.336828 sys 0.000000 (best of 3) Openoffice (~77k entries in fncache)): $ hg perffncacheencode ! wall 1.533000 comb 1.528810 user 1.528810 sys 0.000000 (best of 7) Xen (~10k entries in fncache): $ hg perffncacheencode ! wall 0.198000 comb 0.187201 user 0.187201 sys 0.000000 (best of 51) Done on Windows 7 x64. diff --git a/contrib/perf.py b/contrib/perf.py --- a/contrib/perf.py +++ b/contrib/perf.py @@ -195,6 +195,16 @@ def perffncachewrite(ui, repo): s.fncache.write() timer(d) +def perffncacheencode(ui, repo): + from mercurial import store + s = store.store(set(['store','fncache','dotencode']), + repo.path, scmutil.opener) + s.fncache._load() + def d(): + for p in s.fncache.entries: + s.encode(p) + timer(d) + def perfdiffwd(ui, repo): """Profile diff of working directory changes""" options = { @@ -226,6 +236,7 @@ cmdtable = { 'perfcca': (perfcca, []), 'perffncacheload': (perffncacheload, []), 'perffncachewrite': (perffncachewrite, []), + 'perffncacheencode': (perffncacheencode, []), 'perflookup': (perflookup, []), 'perfrevrange': (perfrevrange, []), 'perfnodelookup': (perfnodelookup, []),