[hibernate-issues] [Hibernate-JIRA] Created: (HHH-6735) Performance hostpot in FieldInterceptionHelper.JavassistDelegate.isInstrumented(Class)

Sanne Grinovero (JIRA) noreply at atlassian.com
Fri Oct 14 14:13:22 EDT 2011


Performance hostpot in FieldInterceptionHelper.JavassistDelegate.isInstrumented(Class)
--------------------------------------------------------------------------------------

                 Key: HHH-6735
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6735
             Project: Hibernate Core
          Issue Type: Improvement
            Reporter: Sanne Grinovero
            Assignee: Emmanuel Bernard
             Fix For: 4.0.0.next
         Attachments: HibernateCore Hot spots.tar.gz

The method {code}org.hibernate.bytecode.instrumentation.internal.FieldInterceptionHelper.JavassistDelegate.isInstrumented(Class){code} is invoked frequently at runtime, creating a significant performance bottleneck; I'm attaching the profiling report from a synthetic micro benchmark which is unlikely to be representative of a real world case, but able to show a waste of 27% of CPU time in this method only.

>From previous discussion:{quote}>
> This is something we should fix in Core; it should be possible to
> associate a "isInstrumented" flag to the Entity, so that we don't need
> to check the class hierarchy at each invocation? I think this should
> reside in the EntityMetamodel, and the
> FieldInterceptionHelper.isInstrumented be invoked only once per type.

Yes, I think it's a good idea. We will still need FieldInterceptionHelper.isInstrumented in some situations where the SessionFActory is unknown but that will help in all the common Hibernate operations.{quote}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list