[hibernate-dev] Adding a Byte Buddy byte code provider to Hibernate

Steve Ebersole steve at hibernate.org
Sat Oct 1 12:29:41 EDT 2016


As I have said quite often I would love to have a ByteBuddy
BytecodeProvider or possibly switch from Javassist to ByteBuddy. The issue
is resources.  I don't have the time right now.

For what it is worth, Chiba does have the changes in place to support Java
9 in Javassist.  That is actually not the reason I want to look at
ByteBuddy.

On Sat, Oct 1, 2016, 10:42 AM Vlad Mihalcea <mihalcea.vlad at gmail.com> wrote:

> Hi Steve,
>
> Since we have issues with Javassist and Java 1.9, maybe it's the right time
> to consider switching to ByteBuddy.
>
> Vlad
>
> On Sat, Oct 1, 2016 at 6:22 PM, Rafael Winterhalter <rafael.wth at gmail.com>
> wrote:
>
> > Hello everybody,
> >
> > 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:
> > https://github.com/raphw/hibernate-bb 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
> > 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
>


More information about the hibernate-dev mailing list