[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-3905) Improve FieldInterceptionHelper perfomance
Steve Ebersole (JIRA)
noreply at atlassian.com
Thu May 7 12:21:13 EDT 2009
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-3905?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=33127#action_33127 ]
Steve Ebersole commented on HHH-3905:
-------------------------------------
The interface against which to check here would need to be obtained via reflection (and it potentially not even being available on the classpath accounted for). So that check would need to be something like:
public static boolean isInstrumented(Class entityClass) {
Class cglibContract = locateClass( "org.hibernate.repackage.cglib.transform.impl.InterceptFieldEnabled" );
Class javassistContract = locateClass( "org.hibernate.bytecode.javassist.FieldHandled" );
return cglibContract.isAssignableFrom( entityClass ) || javassistContract.isAssignableFrom( entityClass );
}
So do you have the numbers showing that this is indeed a performance improvement?
And before you ask... No we cannot use [ return org.hibernate.repackage.cglib.transform.impl.InterceptFieldEnabled.class.isAssignableFrom( entityClass ) || ... ]
> Improve FieldInterceptionHelper perfomance
> ------------------------------------------
>
> Key: HHH-3905
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3905
> Project: Hibernate Core
> Issue Type: Improvement
> Components: core
> Affects Versions: 3.3.1
> Reporter: Sergey Vladimirov
> Priority: Minor
> Attachments: patch.txt
>
> Original Estimate: 1 hour
> Remaining Estimate: 1 hour
>
> do not iterate over interfaces, use Class.isAssignableFrom
--
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.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list