Using custom ByteCodeProvider in Hibernate 6?

BytecodeProvider was turned into a Java ServiceLoader contract via HHH-17643 in 6.2.21, so you can plug your own version if you want to maintain it. The Hibernate Team will only focus on one implementation.

Note that there are many potential reasons for why an application might start up slower. A lot has changed in the bootstrap of Hibernate ORM, so this could very well be due to something else.

If application startup time is important to you, you should consider doing the bytecode enhancement at build time or switch over to Quarkus directly, which does that out of the box and also allows you to compile to a native image, further lowering the startup time into the range of milliseconds.