[Bioperl-l] Memory Leak in Bio::SearchIO
Clarke, Wayne
ClarkeW at AGR.GC.CA
Mon May 15 19:40:15 UTC 2006
Hey everyone,
I have been developing some code to download and parse blast reports
from a remote server using Soap::Lite as well as insert the results into
a mysql database. The problem I am having is that my program seems to be
taking up and huge amount of RAM. For a single job of 10000 queries it
can consume as much as a couple hundred Mb inside an hour. I realize
that a lot of work is being done but this seems like way too much. This
leads me to the subject of my post. I think I may have traced the source
of the memory leak to Bio::SearchIO. I have used Devel::Size to track
the size of my variables and done other debugging steps and have had no
luck with resolving this very frustrating problem. My code is as
follows:
my $result = $connector->getQueryResult($query_id);
my $FH;
open $FH, "<", \$result;
my $searchio = new Bio::SearchIO(-format => "blast",
-fh => $FH);
while (my $o_blast = $searchio->next_result()) {
my $clone_id = $o_blast->query_name();
my $statement = $bdbi->form_push_SQL ($o_blast,
$clone_id, 5);
this is just the leading and tailing code surrounding the use of
Bio::SearchIO since there is quite a lot. I am mostly just wondering if
anyone has ever had problems with SearchIO and its memory usage. I
looked at the source code for it but am afraid it is out of my league.
Any help/suggestions/questions would be great. Thanks
More information about the Bioperl-l
mailing list