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

Steve Ebersole (JIRA) noreply at atlassian.com
Tue Dec 27 15:33:19 EST 2011


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-6735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44730#comment-44730 ] 

Steve Ebersole commented on HHH-6735:
-------------------------------------

Hmm, I think this issue might have been easier to fix than what was done here unless I am misunderstanding something.  

Why not just delegate to {{org.hibernate.persister.entity.EntityPersister#isInstrumented}} ?  Seems you are duplicating that information here in this {{org.hibernate.service.instrumentation.internal.CachingInstrumentationService#isInstrumentedCache}} cache.

> 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.CR5
>
>         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