db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ilkka Priha <impr...@surfeu.fi>
Subject Commons-lang-2.0 slows down performance
Date Wed, 05 Nov 2003 20:53:26 GMT
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


Mime
View raw message