[hibernate-issues] [JIRA] (HHH-14070) Performance: ResultSetWrapperProxy.locateCorrespondingColumnIndexMethod() should use a cache for column methods

Joerg Schweikert (JIRA) jira at hibernate.atlassian.net
Fri Jun 12 07:34:59 EDT 2020


Joerg Schweikert ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5ee35be91fb2ca0ac53f7960 ) *created* an issue

Hibernate ORM ( https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiMWMwYmY1MTNiYjU4NDBmNTk4NWIyYWQ3MWFjYTUzYjgiLCJwIjoiaiJ9 ) / Improvement ( https://hibernate.atlassian.net/browse/HHH-14070?atlOrigin=eyJpIjoiMWMwYmY1MTNiYjU4NDBmNTk4NWIyYWQ3MWFjYTUzYjgiLCJwIjoiaiJ9 ) HHH-14070 ( https://hibernate.atlassian.net/browse/HHH-14070?atlOrigin=eyJpIjoiMWMwYmY1MTNiYjU4NDBmNTk4NWIyYWQ3MWFjYTUzYjgiLCJwIjoiaiJ9 ) Performance: ResultSetWrapperProxy.locateCorrespondingColumnIndexMethod() should use a cache for column methods ( https://hibernate.atlassian.net/browse/HHH-14070?atlOrigin=eyJpIjoiMWMwYmY1MTNiYjU4NDBmNTk4NWIyYWQ3MWFjYTUzYjgiLCJwIjoiaiJ9 )

Issue Type: Improvement Affects Versions: 4.2.20 Assignee: Unassigned Attachments: patch.zip Components: hibernate-core Created: 12/Jun/2020 04:34 AM Environment: Hibernate 4.2.20
DBMS: Oracle and SQL Server
Priority: Major Reporter: Joerg Schweikert ( https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=5ee35be91fb2ca0ac53f7960 )

Profiling our database access shows that a lot of execution time is consumed while detecting the column method via reflection multiple times in ResultSetWrapperProxy.locateCorrespondingColumnIndexMethod(). Especially if a lot of result set columns are involved.

This improvement suggestion use a cache instead of detecting the column method over and over again.
Find a patch for Hibernate version 4.2.20 attached. A cache class IntMethodCache is hocked into ResultSetWrapperProxy. The cache fills lazy and reduce the number of Class#getMethod calls to a minimum.

The same issue tackled with HHH-12699 ( https://hibernate.atlassian.net/browse/HHH-12699 ) Closed but is only fix with 5.3.2

( https://hibernate.atlassian.net/browse/HHH-14070#add-comment?atlOrigin=eyJpIjoiMWMwYmY1MTNiYjU4NDBmNTk4NWIyYWQ3MWFjYTUzYjgiLCJwIjoiaiJ9 ) Add Comment ( https://hibernate.atlassian.net/browse/HHH-14070#add-comment?atlOrigin=eyJpIjoiMWMwYmY1MTNiYjU4NDBmNTk4NWIyYWQ3MWFjYTUzYjgiLCJwIjoiaiJ9 )

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.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail ) or iOS ( https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100128- sha1:14a4bff )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/hibernate-issues/attachments/20200612/4aa759c3/attachment.html 


More information about the hibernate-issues mailing list