quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.35k stars 2.56k forks source link

Move more of Hibernate ORM startup to build-time initialization #40897

Open yrodiere opened 1 month ago

yrodiere commented 1 month ago

Description

Hibernate ORM 7 has a revamped early startup (metadata processing), which can (optionally) take advantage more heavily of Jandex indexes.

That's not something we can take advantage of right now, because this part of the Hibernate ORM startup happens during static init, where Jandex indexes are no longer available.

As part of the Hibernate ORM 7 upgrade, we should try to move that part of the startup to build time.

Ideally we should work on this soon, while Hibernate ORM 7 is not final yet, so that we can request changes to make things easier. I anticipate that bytecode recording of sometimes complex metadata structures in Hibernate ORM will be challenging.

Note @dmlloyd mentioned we could evolve bytecode recording to suit the needs of the Hibernate ORM extension, or even consider alternative solutions to "serialize" information from build time to static init. Let's try with bytecode recording first though.

Implementation ideas

No response

quarkus-bot[bot] commented 1 month ago

/cc @gsmet (hibernate-orm)