[MERGE/RFC] Odd processing during BzrDir.sprout()
Andrew Bennetts
andrew at canonical.com
Fri Sep 12 01:07:22 BST 2008
John Arbash Meinel wrote:
[...]
> Looking more closely, I think we need to address some stuff in BzrDir.sprout().
>
> I see it doing:
> source_branch = self.open_branch()
> source_repository = source_branch.repository
>
> But I never see it *locking* those objects. Which means it isn't caching any
> information between calls.
Also, I just noticed that one of the first things BzrDir.sprout does is call
self.cloning_metadir... which opens a branch (or repository if that fails), and
a working tree, and then discards those objects. So BzrDir.sprout inevitably
opens the source branch multiple times. If the source branch is remote, that's
a fair bit of wasted effort.
So, lots of scope for improvement in this area.
-Andrew.
More information about the bazaar
mailing list