[Biojava-dev] Greedy SymbolList.subStr()!

mark.schreiber at group.novartis.com mark.schreiber at group.novartis.com
Sun Jan 23 21:09:09 EST 2005


Sounds like a memory leak in the subStr method. Can you tell me what 
implementation of SymbolList is being used in your program? Probably 
SimpleSymbolList but I should make sure. Also, does your profiler give any 
clues such as thousands of Strings being instantiated?

Thanks,

Mark





Rainer Pudimat <rpudimat at informatik.uni-jena.de>
Sent by: biojava-dev-bounces at portal.open-bio.org
01/21/2005 03:50 PM

 
        To:     biojava-dev at biojava.org
        cc:     (bcc: Mark Schreiber/GP/Novartis)
        Subject:        [Biojava-dev] Greedy SymbolList.subStr()!


Hello,

I am debugging a search algorithm because it breaks
with an OutOfMemoryException after a long time
whereas I would expect constant memory demands.

After running a profiler for several parts of the
programme, I found out that the biojava method

SymbolList.subStr(int,int) (biojava 1.3)

is the greedy piece of code.
For instance, consider the following two loops which
do the same:

1.
int r =....;
int l =....;
int length=0;
Sequence seq= .....;
while(true)
{
    length = seq.subStr(l,r).length();
}

This programm stops with OutOfMemoryException.

2.
int r =....;
int l =....;
int length=0;
Sequence seq= .....;
while(true)
{
    length = seq.seqString().subString(l-1,r-1).length();
}

This programm never ends.

Bye,
Rainer Pudimat
_______________________________________________
biojava-dev mailing list
biojava-dev at biojava.org
http://biojava.org/mailman/listinfo/biojava-dev





More information about the biojava-dev mailing list