RFC: startup time - again
Aaron Bentley
aaron at aaronbentley.com
Tue Sep 9 16:23:26 BST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
David Cournapeau wrote:
> Matthew D. Fuller wrote:
>> Now, when I wipe out bzrlib/plugins/launchpad, there's that ~100ms
>> back. So a quarter of the time used by 'bzr rocks' is used in the
>> launchpad plugin.
>>
>
> This is not surprising: lp plugin import both xmlrpclib (which is really
> slow to import) and urlparse
xmlrpclib and urlparse are not loaded when commands such as "bzr rocks"
are run.
The lp plugin loads the following:
from bzrlib.branch import Branch
from bzrlib.commands import Command, Option, register_command
from bzrlib.directory_service import directories
from bzrlib.errors import BzrCommandError, NoPublicBranch, NotBranchError
from bzrlib.help_topics import topic_registry
The others are imported only when launchpad-specific functionality is
invoked, such as the lp directory service or the register-branch command.
In my tests, the best bzr rocks time I get is:
without launchpad plugin:
real 0m0.217s
user 0m0.156s
sys 0m0.032s
with launchpad plugin:
real 0m0.217s
user 0m0.180s
sys 0m0.024s
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIxpTt0F+nu1YWqI0RAkYoAJ4lJx91zFf1acMwuCJCT9jp7VHZLQCfetmp
/XhTi/HdPRxkW0a166k5YeA=
=ogjH
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list