Since we have issues with Javassist and Java 1.9, maybe it's the right time
to consider switching to ByteBuddy.
On Sat, Oct 1, 2016 at 6:22 PM, Rafael Winterhalter <rafael.wth(a)gmail.com>
I was wondering how big the chances are to get a Byte Buddy bytecode
provider into Hibernate? Byte Buddy has matured a lot over the last two
years and it aims a lot on performance what is something Hibernate could
benefit of. There are comparion charts posted on the Byte Buddy webpage. As
a bonus, Byte Buddy is already ready for Java 9 and gives a lot of features
for free, for example generic meta data retention and a possibility to
retain annotations on subclassed types and overridden methods.
I have written a simple proof of concept here:
without having tested it - I did not
implement the fast class providers as I have learned after a lot of
benchmarking that those do not improve performance on Java 8+ VMs anymore.
Using such fast-classing rather pollutes the code cache than bring any
benefit. The only advantage with code generation in this field comes when
avoiding boxing what is not the case. But of course, I can implement
something in Byte Buddy to apply such a fast-class mechanism.
Let me know what you think. I am more then happy to help you with
implementing such a provider. Other frameworks such as Mockito already use
Byte Buddy on a large scale and made good experiences with it.
Best regards, Rafael
hibernate-dev mailing list