MQ performance on large repo
Greg Ward
greg at gerg.ca
Mon Mar 1 16:52:02 CST 2010
On Mon, Mar 1, 2010 at 4:35 PM, Adrian Buehlmann <adrian at cadifra.com> wrote:
> These line numbers are rather weird.
That's because I had to hack store.py to get the stack trace.
> What version of mercurial is that? Can you please rerun with crew tip?
Sure. I've updated to b1339234080e and modifed store.py like this:
diff --git a/mercurial/store.py b/mercurial/store.py
--- a/mercurial/store.py
+++ b/mercurial/store.py
@@ -244,6 +244,10 @@
def _load(self):
'''fill the entries from the fncache file'''
+ import traceback
+ print "fncache._load() called from:"
+ traceback.print_stack()
+
self.entries = set()
try:
fp = self.opener('fncache', mode='rb')
Now I qrefresh:
$ hgc --time --prof qref
fncache._load() called from:
File "/home/gward/bin/hgc", line 27, in <module>
mercurial.dispatch.run()
File "/home/gward/src/hg-crew/mercurial/dispatch.py", line 16, in run
sys.exit(dispatch(sys.argv[1:]))
File "/home/gward/src/hg-crew/mercurial/dispatch.py", line 30, in dispatch
return _runcatch(u, args)
File "/home/gward/src/hg-crew/mercurial/dispatch.py", line 47, in _runcatch
return _dispatch(ui, args)
File "/home/gward/src/hg-crew/mercurial/dispatch.py", line 467, in _dispatch
return runcommand(lui, repo, cmd, fullargs, ui, options, d)
File "/home/gward/src/hg-crew/mercurial/dispatch.py", line 337, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "/home/gward/src/hg-crew/mercurial/dispatch.py", line 501, in _runcommand
return checkargs()
File "/home/gward/src/hg-crew/mercurial/dispatch.py", line 472, in checkargs
return cmdfunc()
File "/home/gward/src/hg-crew/mercurial/dispatch.py", line 466, in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
File "/home/gward/src/hg-crew/mercurial/util.py", line 401, in check
return func(*args, **kwargs)
File "/home/gward/src/hg-crew/hgext/mq.py", line 2053, in refresh
ret = q.refresh(repo, pats, msg=message, **opts)
File "/home/gward/src/hg-crew/hgext/mq.py", line 1384, in refresh
backup='strip')
File "/home/gward/src/hg-crew/hgext/mq.py", line 922, in strip
repair.strip(self.ui, repo, rev, backup)
File "/home/gward/src/hg-crew/mercurial/repair.py", line 130, in strip
repo.sopener(file, 'a').truncate(troffset)
File "/home/gward/src/hg-crew/mercurial/store.py", line 299, in fncacheopener
and path not in fnc):
File "/home/gward/src/hg-crew/mercurial/store.py", line 278, in __contains__
self._load()
File "/home/gward/src/hg-crew/mercurial/store.py", line 249, in _load
traceback.print_stack()
CallCount Recursive Total(ms) Inline(ms) module:lineno(function)
247385 0 2.3013 1.3476
mercurial.store:24(decodedir)
+742155 0 0.6963 0.6963 +<method 'replace'
of 'str' objects>
+247385 0 0.2575 0.2575 +<method
'startswith' of 'str' objects>
1 0 4.0739 1.2936 mercurial.store:245(_load)
+247385 0 2.3013 1.3476
+mercurial.store:24(decodedir)
+247385 0 0.3068 0.3068 +<method 'add' of
'set' objects>
+247385 0 0.1634 0.1634 +<len>
[...]
Time: real 11.830 secs (user 9.040+0.000 sys 2.680+0.000)
More information about the Mercurial-devel
mailing list