Bzr's startup time (was: mercurial / bazaar meeting ?)

Jan Hudec bulb at ucw.cz
Mon Jun 26 08:28:42 BST 2006


On Mon, Jun 26, 2006 at 09:13:41 +0200, Matthieu Moy wrote:
> Martin Pool <mbp at canonical.com> writes:
> 
> > It is highly impressive, considering it's Python.  John's cool
> > --profile-imports option (now in bzr.dev) gives us a tool for
> > finding modules and other things that slow down startup, and we're
> > working on eliminating them.  A longer term change is the
> > integrated working directory state that Robert posted about recently. 
> 
> I think the large number of python imports at the beginning of
> builtins.py is also a problem.
> 
> For example, to run "bzr version", I need to load builtins.py which in
> turn will load many thing in bzrlib to just issue a trivial message.
> Similarly, some local operations (bzr ignore, bzr add) will need to
> import Branch.
> 
> It would probably be wise to split the command functions in
> builtins.py into a trivial function doing only the argument parsing,
> and calling a function in another file, which in turn would do the
> correct imports and perform the actual job.

IMHO it's easier to use either demandload (it can only be used in some
modules and/or for some imports where it makes bigest difference) or to
use import statements inside functions.

-- 
						 Jan 'Bulb' Hudec <bulb at ucw.cz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060626/269385ca/attachment.pgp 


More information about the bazaar mailing list