[MERGE] Various hackery to reduce startup time.

Andrew Bennetts andrew at canonical.com
Fri Sep 12 06:08:59 BST 2008


This is that “faster-startup” branch I've been talking about.

Here's a summary of what it does... not all of it is necessarily a good idea, or
well-executed:

  - earlier installation of lazy_regex
  - many dead imports removed
  - many imports made lazy (probably more than is usefuL)
  - some imports made *not* lazy! (because it's a waste of effort if they are
    going to be always used)
  - bzrlib.user_encoding completely removed (bzrlib.osutils.get_user_encoding
    was already preferred), which makes a bare "import bzrlib" lighter-weight.
  - avoid importing modules we only use for win32 (e.g. ctypes, win32utils) on
    non-win32 platforms
  - a few contortions to avoid necessarily importing sha, ConfigObj
  - add lazy_registry to RegistryOption
  - use properties for _serializer attributes of various RepositoryFormats so
    that xml5/6/7/8 modules aren't always loaded
  - moved a private function from bzrlib.diff to bzrlib.status so that the
    latter doesn't need to import the former.
  - prevent configobj from importing compiler, we don't need the 'unrepr'
    feature of configobj that uses that module.

See the diff for the gory details.

-Andrew.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: faster-startup-3254.patch
Type: text/x-diff
Size: 110048 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080912/20ac8e83/attachment-0001.bin 


More information about the bazaar mailing list