[Bioperl-l] Performance of Bio::Species

Jason Stajich jason at bioperl.org
Sat Nov 25 16:20:41 EST 2006

The circular ref is from Bio::Species when you have
   $self->{tree} = Bio::Tree::Tree->new(-root => $self);

I added a weaken call in Bio::Species code explicitly -- we can't  
generally weaken the ref to the root node in Bio::Tree::Tree as that  
breaks some other things as you saw.

I'm not sure I am digging what you've done with Bio::Tree::Tree. Why  
didn't you make a specialized Tree object for Taxonomy stuff so that  
you can add methods like lineage_node, etc?  We'll talk about it in  
more detail in Dec I guess to see if we can clean up some of the  
things here.


On Nov 25, 2006, at 5:57 AM, Sendu Bala wrote:

> Chris Fields wrote:
>> On Nov 25, 2006, at 6:47 AM, Sendu Bala wrote:
>> ...
>>> I think the Tree actually only keeps a ref to its root Node,  
>>> which means
>>> Nodes in general must keep hard refs to their Descendants. With that
>>> constraint, I haven't been able to break the deadlock and get these
>>> things to clean up.
>>> Hopefully I'm missing something obvious; please look into it.
>> I'm curious to see if this affects sequence parsing (i.e.  
>> SwissProt DB parsing).  Does anyone know?  It sounds pretty serious.
> Any time you create lots of Bio::Species objects the memory leak  
> ought to arise.
>> Sendu, could you commit a bug report for this?  I don't think this  
>> should hold up rel 1.5.2 (it's a dev release) but it would be nice  
>> to get it fixed.
> http://bugzilla.open-bio.org/show_bug.cgi?id=2149

Jason Stajich, PhD
Miller Research Fellow
University of California, Berkeley
lab: 510.642.8441

More information about the Bioperl-l mailing list