[Biojava-dev] Greedy SymbolList.subStr()!
Rainer Pudimat
rpudimat at informatik.uni-jena.de
Fri Jan 21 02:50:18 EST 2005
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
More information about the biojava-dev
mailing list