[
https://hibernate.onjira.com/browse/HHH-7190?page=com.atlassian.jira.plug...
]
Steve Ebersole commented on HHH-7190:
-------------------------------------
Current code is using {{java.lang.reflect.Proxy#newProxyInstance}}, which is a convenience
method. However, this does require calls into the synchronized method
{{java.lang.reflect.Proxy#getProxyClass}} each and every time a proxy instance is
generated. In concurrent systems that sync is a potential bottleneck.
Switching to explicitly building and holding on to the proxy class reference and then
manually instantiating the proxies as needed through that class reference, rather than
using the convenience method, should eliminate that bottleneck.
Cache JDBC proxy class defintions
---------------------------------
Key: HHH-7190
URL:
https://hibernate.onjira.com/browse/HHH-7190
Project: Hibernate ORM
Issue Type: Improvement
Components: core
Affects Versions: 4.0.1, 4.1.1
Environment: java version "1.6.0_23"
Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
Java HotSpot(TM) 64-Bit Server VM (build 19.0-b09, mixed mode)
Reporter: Lucas POUZAC
Labels: performance
Attachments: hibernate.jpg
After migrating our application to version 4.0.1 of hibernate, we noticed a performance
degradation. (same problem with the version 4.1.1)
Before migration, the average response time of our http request was 747ms (during load
test).
Since the migration, the average response time is greater than 1200ms (during the same
load test).
After recording the behavior of the JVM, we note that Hibernate uses methods of the java
api with synchronized blocks (java.lang.reflect.Proxy.getProxyClass (...)). See
attachment.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira