[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2229?page=all ]
Scott Marlow closed HHH-2229:
-----------------------------
From the forum discussion:
"I've used the patch to build hibernate and the performance is much better in the
cases then the invoke method of the CGLIBLazyInitializer class is called.
"
Performance issue with fix for HHH-1293, CGLIBLazyInitializer may be
slower for certain Java classes
----------------------------------------------------------------------------------------------------
Key: HHH-2229
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2229
Project: Hibernate3
Type: Bug
Versions: 3.2.0.ga
Reporter: Scott Marlow
Assignee: Scott Marlow
Fix For: 3.2.1
Attachments: CGLIBLazyInitializer.patch, JavassistLazyInitializer.patch
Customer reports:
"we've used the Hibernate for Version 3.2.0 CR 2 with Hibernate Annotations and
Proxy interfaces for Lazy initialization. After we changed to Version 3.2.0 GA our
Application is 5-7 times slower than before. My Java Profiler says that the Class
org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.addCheckingTypes is called over 11
Million times (with recursion). This method was not present in the old release candidate.
The problem is that this methods adds recursively all interfaces of a type and its
subclasses into a List in our non trivial object hierarchy.
"
And later:
"The CGLIBLazyInitializer.invoke() method was called 64.000 Times. I found out that
the Problem were the @Proxy annotations with a specified proxy interface in all of our
classes (this was necessary in the old version to prevent ClassCastExceptions). If we
specify the proxy interface only on the classes where we need it, the performance is much
better.
"
Forum reference:
http://forum.hibernate.org/viewtopic.php?t=967060
I'll look into some suggestions that Steve suggested that I try:
1. use class.isAssignableFrom() .
2. use class.isInstance(). if ( !method.getDeclaringClass().isInstance( target ) )
{throw new ClassCastException( target.getClass() .getName() );}
3. use instanceof test
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira