Skip to content

Optimize Hibernate native footprint by making ByteBuddy unreachable #29549

@sdeleuze

Description

@sdeleuze

As experimented on sdeleuze@hibernate-custom-initiators, various optimizations are possible when SpringHibernateJpaPersistenceProvider configures Hibernate with a custom list of StandardServiceInitiator.

On native, it should allow to remove Bytebuddy from the reachable code path at runtime (enhancements are needed on Hibernate side for this), but likely many other optimizations should be possible for both JVM and native, potentially leveraging some AOT optimizations like entity scanning, making XML parsing not reachable as well when there is no such file, etc.

I would be interested to explore those optimizations in collaboration with the Spring Data team cc @mp911de @schauder @christophstrobl.

Note the impact on compatibility and maintainability should be evaluated as we would probably have to provide distinct variants for Hibernate 5 and Hibernate 6, or to support only Hibernate 6.

Metadata

Metadata

Assignees

Labels

in: dataIssues in data modules (jdbc, orm, oxm, tx)theme: aotAn issue related to Ahead-of-time processingtype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions