[RFC] Out of memory during BzrDir.find_branches
Jonathan Lange
jml at mumak.net
Mon Apr 21 01:27:06 BST 2008
Hello,
I was doing some work on the bzr-removable plugin yesterday, and was
having some problems with BzrDir.find_branches. Specifically, when I
run it on one of my other projects it takes a while, chews up CPU and
memory and then raises an out-of-memory error.
Taking a peak at the implementation, I notice that it builds all of
the open branches into a big list. This seems bound to cause problems.
Would it be a good thing to make BzrDir.find_branches an iterator?
I can imagine that there are other, deeper memory consumption issues
at play here. Still, making find_branches an iterable means that
bzr-removable could use it.
cheers,
jml
More information about the bazaar
mailing list