thanks for reporting this, I'd interested in all performance improvement :D
I didn't notice this, but not sure if javassist team already aware of this.
wrt the javassist version, I think that's javassist team's call to decide which
version should be patched, but I guess it mostly should be the latest one.
we, hibernate, shouldn't have any problem to upgrade to the latest javassist.
and please let me know the javassist jira when you open it, I will keep an eye on it,
Strong Liu <stliu at hibernate.org>
On Mar 30, 2012, at 10:19 AM, Nikita Tovstoles wrote:
Long time listener, first time caller here - thanks for an excellent
We've been profiling our Hibernate 3.6.10-based app and noticed a perf
bottleneck in javassist.util.proxy.RuntimeSupport.find2methods.
Unfortunately, this method, which has a synch. block, is being called on
every invocation of every proxied entity method (see
javassist.util.proxy.ProxyFactory.makeForwarder(), called indirectly by
ProxyFactory.createClass()). In our testing, the result is that our service
call's latency increases from 33 to 55, 260, 400ms as concurrency increases
1-10-20-30 users on a 4-core CPU. At 20 and 30 users 51% of CPU time is
spent contending for a monitor in RuntimeSupport.find2methods.
Since find2methods merely interrogates class metadata, seems like its return
values should be cached (in a ConcurrentMap?). Since this is a big problem
for us, I am happy to submit a patch to javassist, but would like to know
which version should I be patching, given that I am primarily interesting in
using javassist in conjunction with Hibernate? Currently, hibernate-core
4.1.1 uses javassist 3.15.0-GA, 3.10.Final uses 3.12. Latest GA is 3.16-1.
I'd appreciate any other advice as well (perhaps this problem's been
hibernate-dev mailing list