Bzr's startup time (was: mercurial / bazaar meeting ?)
Matthieu Moy
Matthieu.Moy at imag.fr
Mon Jun 26 08:13:41 BST 2006
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.
--
Matthieu
More information about the bazaar
mailing list