Debian package defetas demandimport
Isaac Jurado
diptongo at gmail.com
Sat Jul 10 04:03:33 CDT 2010
Hi,
After using the Debian Sid version (1.6-2) a bit, I noticed that there
was some delay on each command, so I ran a couple of profiles. Then I
compared it to the vanilla 1.6 (from main repo, with make local) and I
got the following results.
With Debian Sid Mercurial, running "hg --profile branch" on the
Mercurial main repository:
CallCount Recursive Total(ms) Inline(ms) module:lineno(function)
6 3 0.0182 0.0176 <__import__>
+1 0 0.0006 0.0002 +mercurial.dirstate:8(<module>)
1 0 0.0006 0.0002 mercurial.dirstate:8(<module>)
+11 0 0.0002 0.0001 +mercurial.demandimport:81(_demandimport)
+1 0 0.0001 0.0001 +mercurial.dirstate:37(dirstate)
+1 0 0.0001 0.0000 +mercurial.demandimport:72(__getattribute__)
20 17 0.0183 0.0001 mercurial.demandimport:72(__getattribute__)
+4 1 0.0182 0.0001 +mercurial.demandimport:44(_load)
+8 0 0.0000 0.0000 +mercurial.demandimport:72(__getattribute__)
+4 0 0.0000 0.0000 +<getattr>
11 0 0.0002 0.0001 mercurial.demandimport:81(_demandimport)
+9 0 0.0001 0.0001 +mercurial.demandimport:32(__init__)
+2 0 0.0000 0.0000 +<__import__>
+2 0 0.0000 0.0000 +<method 'split' of 'str' objects>
+2 0 0.0000 0.0000 +<hasattr>
4 1 0.0182 0.0001 mercurial.demandimport:44(_load)
+4 1 0.0182 0.0176 +<__import__>
+8 0 0.0000 0.0000 +mercurial.demandimport:72(__getattribute__)
+4 0 0.0000 0.0000 +<method 'get' of 'dict' objects>
1 0 0.0001 0.0001 mercurial.dirstate:37(dirstate)
+11 0 0.0000 0.0000 +mercurial.util:159(__init__)
1 0 0.0001 0.0001 <method 'write' of 'file' objects>
9 0 0.0001 0.0001 mercurial.demandimport:32(__init__)
1 0 0.0001 0.0001 <method 'read' of 'file' objects>
1 0 0.0001 0.0001 mercurial.util:504(__call__)
+1 0 0.0000 0.0000 +mercurial.util:725(splitpath)
+1 0 0.0000 0.0000 +<method 'update' of 'set' objects>
+2 0 0.0000 0.0000 +<method 'lower' of 'str' objects>
+1 0 0.0000 0.0000 +<method 'pop' of 'list' objects>
+1 0 0.0000 0.0000 +<method 'add' of 'set' objects>
And with the local build, the same command:
CallCount Recursive Total(ms) Inline(ms) module:lineno(function)
6 3 0.0011 0.0007 <__import__>
+1 0 0.0004 0.0001 +mercurial.dirstate:8(<module>)
1 0 0.0004 0.0001 mercurial.dirstate:8(<module>)
+11 0 0.0002 0.0001 +mercurial.demandimport:81(_demandimport)
+1 0 0.0001 0.0000 +mercurial.dirstate:37(dirstate)
+1 0 0.0000 0.0000 +mercurial.demandimport:72(__getattribute__)
20 17 0.0013 0.0001 mercurial.demandimport:72(__getattribute__)
+4 1 0.0012 0.0001 +mercurial.demandimport:44(_load)
+8 0 0.0000 0.0000 +mercurial.demandimport:72(__getattribute__)
+4 0 0.0000 0.0000 +<getattr>
4 1 0.0012 0.0001 mercurial.demandimport:44(_load)
+4 1 0.0011 0.0007 +<__import__>
+8 0 0.0000 0.0000 +mercurial.demandimport:72(__getattribute__)
+4 0 0.0000 0.0000 +<method 'get' of 'dict' objects>
11 0 0.0002 0.0001 mercurial.demandimport:81(_demandimport)
+9 0 0.0001 0.0001 +mercurial.demandimport:32(__init__)
+2 0 0.0000 0.0000 +<__import__>
+2 0 0.0000 0.0000 +<method 'split' of 'str' objects>
+2 0 0.0000 0.0000 +<hasattr>
9 0 0.0001 0.0001 mercurial.demandimport:32(__init__)
1 0 0.0001 0.0001 mercurial.util:504(__call__)
+1 0 0.0000 0.0000 +mercurial.util:725(splitpath)
+1 0 0.0000 0.0000 +<method 'update' of 'set' objects>
+1 0 0.0000 0.0000 +<method 'pop' of 'list' objects>
+2 0 0.0000 0.0000 +<method 'lower' of 'str' objects>
+1 0 0.0000 0.0000 +<method 'add' of 'set' objects>
1 0 0.0001 0.0001 <method 'write' of 'file' objects>
1 0 0.0001 0.0000 mercurial.dirstate:37(dirstate)
+11 0 0.0000 0.0000 +mercurial.util:159(__init__)
1 0 0.0017 0.0000 mercurial.commands:454(branch)
+1 0 0.0000 0.0000 +mercurial.encoding:31(tolocal)
+1 0 0.0013 0.0000 +mercurial.util:162(__get__)
+1 0 0.0001 0.0000 +mercurial.extensions:159(wrap)
+1 0 0.0002 0.0000 +mercurial.dirstate:202(branch)
+1 0 0.0000 0.0000 +<method 'get' of 'dict' objects>
Notice the difference in time for imports. My guess is that the package
version is preventing demandimport from working properly, but I can't
imagine how. And besides, I may be missing something in these tests
(like mixing Debian and upstream Mercurial modules).
I already submitted the bug report (I'll send a link when accepted) but
I would like to provide some help to the Debian people by asking here.
Regards.
--
Isaac Jurado
"The noblest pleasure is the joy of understanding."
Leonardo da Vinci
More information about the Mercurial-devel
mailing list