Hi,
We started using MIBBLE parser in our product, and as in the testing
phase we performed some charge tests
I noticed that there's a real impact of the toString() method of the
ObjectIdentifierValue class on the performance of our product as we try
to supervise about 5000 Network elements and for each element this
method is called about 300 times
So we have 1500000 calls to this recursive method.
I tried to modify this method and this is my new code:
private valueString=null;
public String toString() {
if(valueString==null)
{
String tempValue;
if (parent == null) {
tempValue= String.valueOf(value);
} else {
tempValue= parent.toString() + "." + String.valueOf(value);
}
valueString=tempValue;
}
return valueString;
}
by this way the recursive process is called only once and after that the
cached value is returned, this is better for the performance improvement.
and I don't think that this will cause some problems as it's not
thread-safe.
Thanks.
--Mohamed
_______________________________________________
Mibble-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/mibble-devel