[jbossseam-issues] [JBoss JIRA] Updated: (JBSEAM-1966) Code optimization in Component class

Pete Muir (JIRA) jira-events at lists.jboss.org
Fri Sep 28 11:01:41 EDT 2007


     [ http://jira.jboss.com/jira/browse/JBSEAM-1966?page=all ]

Pete Muir updated JBSEAM-1966:
------------------------------

    Fix Version/s: 2.0.x
                       (was: 2.0.1.GA)

Targetting for 2.0.x series.

> Code optimization in Component class
> ------------------------------------
>
>                 Key: JBSEAM-1966
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-1966
>             Project: JBoss Seam
>          Issue Type: Feature Request
>    Affects Versions: 2.0.0.CR1
>            Reporter: Yannick Lazzari
>             Fix For: 2.0.x
>
>
> During the execution of one JSF request, I noticed a lot of calls to the org.jboss.seam.Component.hasAnnotation method. Couldn't this information be cached somewhere? I know the reflection API is quite fast but in this particular context, couldn't all the "metadata" of a component be stored as class members of the Component class? I know some if already is but I found something that could be added. In the org.jboss.seam.contexts.ServerConversationContext class, the following method seems to be called hundreds of times per request:
> Code:
> private boolean isPerNestedConversation(String name)  {
> 	Component component = Component.forName(name);
> 	return (component != null) && component.beanClassHasAnnotation(PerNestedConversation.class);
> }
> 	
> Could't a "perNestedConversation" class member be added on the org.jboss.seam.Component class and initialized when initializing the component instead of looking for the annotation every time? This is just one example. I haven't looked everywhere where the org.jboss.seam.Component.hasAnnotation is called but perhaps similar optimizations could be done elsewhere. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list