[hibernate-dev] patching javassist - which ver?

Steve Ebersole steve at hibernate.org
Fri Mar 30 10:27:37 EDT 2012


There were lots of problems.  Inactivity was just the final straw.

You can plug in any one you want.  You'll have to develop the proper 
bindings.  The main touch point is 
org.hibernate.bytecode.spi.BytecodeProvider.

The ones mentioned were JBoss developed and actively maintained ones.

https://hibernate.onjira.com/browse/HHH-5684 is the issue dealing with 
not using Javassist ProxyFactory class.  It is linked to the other 
mentioned issue, which is https://hibernate.onjira.com/browse/HHH-5953  
So not using Javassist for proxy generation would require using 2 
libraries as I understood it (and assuming nothing has changed in the 
intervening time): clasfilewriter and jboss-invocation.  Details are on 
the issues...


On Fri 30 Mar 2012 09:20:26 AM CDT, Nikita Tovstoles wrote:
> What are some of the alt libraries you are considering? From my POV, perhaps selfishly, this is a pretty substantial scalability issue. I realize that cglib wasn't being actively maintained, but we didn't see any significant problems with that lib. AFAIK there is still a way to force using cglib for hibernate proxy gen (at least in 3.6.x) - off top of your head do you know of show-stoppers in switching back to cglib, at least temporarily?
>
> Thanks
> -nikita
>
> -----Original Message-----
> From: Steve Ebersole [mailto:steven.ebersole at gmail.com] On Behalf Of Steve Ebersole
> Sent: Friday, March 30, 2012 7:00 AM
> To: Nikita Tovstoles
> Cc: hibernate-dev at lists.jboss.org; 'Strong Liu'
> Subject: Re: [hibernate-dev] patching javassist - which ver?
>
> I have not had time to dig into this, so I cannot speak to the specific
> concern brought up here.  I will say, however, that in some cases we
> are not using Javassist "right" (we should not be using its
> ProxyFactory class).  And there is question whether we should be using
> Javassist at all for proxy generation.  Alot of JBoss projects actually
> ended up moving to some new libraries specifically for proxy building.
> There are already issues in our JIRA for both of those things I
> mentioned.
>
>
> On Fri 30 Mar 2012 08:47:02 AM CDT, Nikita Tovstoles wrote:
>> Filed here:
>>
>> https://issues.jboss.org/browse/JASSIST-163
>>
>>
>>
>>
>>
>>
>>
>> From: Shaozhuang Liu [mailto:shaozhuang.liu at gmail.com] On Behalf Of Strong
>> Liu
>> Sent: Thursday, March 29, 2012 7:37 PM
>> To: Nikita Tovstoles
>> Cc: hibernate-dev at lists.jboss.org
>> Subject: Re: [hibernate-dev] patching javassist - which ver?
>>
>>
>>
>> Hi Nikita,
>>
>>
>>
>> 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, thanks
>>
>> -------------------------
>> Best Regards,
>>
>> Strong Liu<stliu at hibernate.org<http://hibernate.org/>   >
>>
>> http://about.me/stliu/bio
>>
>>
>>
>> On Mar 30, 2012, at 10:19 AM, Nikita Tovstoles wrote:
>>
>>
>>
>>
>>
>> Hello,
>>
>>
>>
>> Long time listener, first time caller here - thanks for an excellent
>> framework.
>>
>>
>>
>> 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
>> discussed?)
>>
>>
>>
>> Thank you,
>>
>> -nikita
>>
>> _______________________________________________
>> hibernate-dev mailing list
>> hibernate-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>>
>>
>>
>> _______________________________________________
>> hibernate-dev mailing list
>> hibernate-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>
> --
> steve at hibernate.org
> http://hibernate.org
>

--
steve at hibernate.org
http://hibernate.org



More information about the hibernate-dev mailing list