mibble-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Mibble-devel] ObjectIdentifierValue performance


From: Per Cederberg
Subject: Re: [Mibble-devel] ObjectIdentifierValue performance
Date: Sun, 23 Apr 2006 13:16:38 +0200
User-agent: Mozilla Thunderbird 1.0.7 (Macintosh/20050923)

Thanks for the patch, Mohamed! It has now been applied
to the Mibble repository. You'll find it included in
version 2.7.alpha2 that was just uploaded to the
download area:

http://www.mibble.org/download/development/index.html

I'll give Alcatel a free upgrade to the 2.7 commercial
version once a stable version has been released.

Cheers,

/Per

address@hidden wrote:
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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]