Analyse retained heap after bootstrap to trim memory consumption

Description

I've been running Eclipse MAT to query the state of the heap retained by a just-started SessionFactory, and found several objects which can be trimmed at minimal effort and risk.

The impact on memory saving are quite good and don't need significant rework; I'm not planning significant changes other than low-hanging fruits, so to also learn what could be done even better in Hibernate ORM 6.

Environment

None
Fixed

Assignee

Sanne Grinovero

Reporter

Sanne Grinovero

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Priority

Major