[hibernate-dev] Bad boot performance since 5.4 switched to ByteBuddy

Yoann Rodiere yoann at hibernate.org
Tue Aug 4 11:49:24 EDT 2020


I have just one comment:

> I haven't tried it yet, but it seems to me that making the
> byteBuddyState in
> org.hibernate.bytecode.internal.bytebuddy.BytecodeProviderImpl static
> might help. I'd guess this will help with the test execution time for
> the Hibernate testsuite as well.

Please don't do this. It was previously static, and that was changed to fix
very real problems:

https://github.com/hibernate/hibernate-orm/commit/d95b36ffb6cea2337d6a0280c86d82912ae585c8

Maybe it's slower than javassist proxying because of that, but it's also
less buggy than javassist proxying because of that?

cc @Guillaume Smet <gsmet at redhat.com>

Yoann Rodière
Hibernate Team
yoann at hibernate.org


On Tue, 4 Aug 2020 at 17:28, Christian Beikov <christian.beikov at gmail.com>
wrote:

> I'm moving this discussion from Zulip to the mailing list as Rafael does
> not seem to be on Zulip. Here a little context:
>
>  > Does anyone know if there is a known performance issue with Bytebuddy
> during boot in 5.4? I noticed that 5.4 takes about 25%, sometimes up to
> 30% percent longer to boot, even when using a prebuilt Jandex index,
> apparently due to the use of Bytebuddy
>
>  > @Moritz Becker found the issue while trying to find out why our
> Blaze-Persistence testsuite runs into CI timeouts with 5.4 but not with 5.3
>
>  > So AFAIK, the PojoEntityTuplizer builds the proxy class through
> org.hibernate.proxy.pojo.bytebuddy.ByteBuddyProxyHelper#buildProxy which
> takes significantly longer than the javassist implementation
>
> I haven't tried it yet, but it seems to me that making the
> byteBuddyState in
> org.hibernate.bytecode.internal.bytebuddy.BytecodeProviderImpl static
> might help. I'd guess this will help with the test execution time for
> the Hibernate testsuite as well.
>
> Any idea how to improve this @Rafael ?
>
> Regards,
>
> Christian
>
> _______________________________________________
> 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