[merge] use lazy imports
mbp at canonical.com
Wed Oct 11 09:53:29 BST 2006
On 6 Oct 2006, John Arbash Meinel <john at arbash-meinel.com> wrote:
> Attached is a follow up patch which continues to find unnecessary
> imports and decreases startup time. I've been able to drop the 'bzr
> rocks' time all the way down to 116ms. (After this patch, bzrlib.errors
> doesn't need to be imported for 'bzr rocks', which shows that errors can
> really be imported late).
> This is still a large patch (1K lines), because when you start lazy
> importing errors.py, you have to change all of the places that use to
> expect to have the error class in the local namespace.
> Next I'll probably focus on getting the 'bzr status' startup time to be
> small. (And maybe 'bzr diff' after that).
More information about the bazaar