RFC: startup time - again
Robert Collins
robertc at robertcollins.net
Tue Sep 9 22:14:55 BST 2008
On Tue, 2008-09-09 at 10:08 -0500, John Arbash Meinel wrote:
>
> Also, encouraging plugins to be more lazy. I know if I don't supply
> '--no-plugins' the import overhead changes to certain plugins that
> preemptively load all of branch, repo and workingtree.
For me, the big thing to remember is that most commands want a tree
object, which implies that triple of class types anyway; we need to
reduce the cost of _using_ these things. - e.g. making loading repo so
cheap its nearly a no-op.
> errors.py is a bit hidden in my --profile-imports testing, because it
> is
> always imported with other things. So it is unclear which one is
> really
> spending all of that time.
>
> I *do* remember it being significant. But 15ms is small compared with
> 60ms in get_user_encoding() and 50ms in configobj.
True.
60ms is 10% runtime.
:!time python -c 'import
locale,codecs;codecs.lookup(locale.getpreferredencoding())'
real 0m0.036s
user 0m0.032s
sys 0m0.008s
How long is that for you?
-Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080910/cb9787f7/attachment.pgp
More information about the bazaar
mailing list