db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ilkka Priha <impr...@surfeu.fi>
Subject Re: Commons-lang-2.0 slows down performance
Date Thu, 06 Nov 2003 06:19:14 GMT
Hi Antonio,

Recently we've been running our test cases with Sun's JDK 1.3.1, 1.4.1, 
1.4.2 and the next beta in Windows and 1.4.1 in Linux. Tested databases 
have been MySQL, MS Access and HSQL. All of them behave exactly the 
same, the only difference causing the slowness is commons-lang-2.0 
compared to commons-lang-1.0.1.

-- Ilkka


Antonio Gallardo wrote:
> Hi:
> 
> What version of Java are you using?
> 
> Best Regards,
> 
> Antonio Gallardo
> 
> Ilkka Priha dijo:
> 
>>Hi
>>
>>We've detected extremely slow performance after updating from
>>commons-lang-1.0.1 to commons-lang-2.0. A web page request making a
>>simple db query can take up to 5000 msecs when it took only about 100
>>msecs with the previous version. This happens only when Log4J categories
>> are fully enabled, i.e. DEBUG level is on.
>>
>>I made some profiling and found out that over 92% of the time was spent
>>in ClassDescriptor.toString() and further in ToStringBuilder.append(),
>>which was the first commons class in the call chain.
>>
>>Most of the method time inside ToStringBuilder was consumed in
>>StringBuffer.extendCapasity(), StringBuffer.append(), String.getChars(),
>> HashMap.get() and other quite normal methods. So the reason must be
>>that  the three page refreshes I made generated a huge number of low
>>level  calls, e.g. 9828 calls to ClassDescriptor.toString(), 274428
>>calls to  ToStringStyle.appendInternal(), 1038438 calls to
>>ReflectionToStringBuilder.getRegistry(), etc.
>>
>>I've not subscribed the common list, but it seems that the new version
>>has some major design flaw making it unsuitable at least for OJB
>>tracing.
>>
>>-- Ilkka
>>
>>
>>
>>
>>--------------------------------------------------------------------- To
>>unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
>>For additional commands, e-mail: ojb-dev-help@db.apache.org
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org
> 
> .
> 




---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message