Sanne Grinovero (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiMGY2Mzc0MDQx...
) / Task (
https://hibernate.atlassian.net/browse/HHH-16741?atlOrigin=eyJpIjoiMGY2Mz...
) HHH-16741 (
https://hibernate.atlassian.net/browse/HHH-16741?atlOrigin=eyJpIjoiMGY2Mz...
) Remove method JdbcMappingContainer#getJdbcMappings() (
https://hibernate.atlassian.net/browse/HHH-16741?atlOrigin=eyJpIjoiMGY2Mz...
)
Issue Type: Task Assignee: Sanne Grinovero (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) Components: hibernate-core Created: 02/Jun/2023 08:32 AM Fix Versions: 6.3.0 Labels:
performance Priority: Major Reporter: Sanne Grinovero (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
The method List<JdbcMapping> getJdbcMappings() , defined primarily on
JdbcMappingContainer but also re-defined in many places of a complex inheritance trees via
various default methods on intrfaces, has been shown to often be a performance problem as
the return of a List inherently represents a mutable contract, hence some implementations
provide defensive copies.
The defensive copy approach however is being applied inconsistently, so not fullfilling on
the safety expectations on one side, and often allocating quite a bit of data as this
method is being often used in hot loops.
Additionally, the concept of iterating or retrieving a JdbcMapping can now be better
fullfilled by using the other methods which we expose on the same interfaces; so to avoid
such mistakes altogether it’s best to actually remove this method, which comes with the
added benefit of removing quite some code and the related complexity, since such
implementations are spread in many subclasses.
(
https://hibernate.atlassian.net/browse/HHH-16741#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16741#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100225- sha1:e03cc87 )