[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-1966) Code optimization in Component class
Przemyslaw Jaskierski (JIRA)
jira-events at lists.jboss.org
Fri Sep 28 10:13:41 EDT 2007
[ http://jira.jboss.com/jira/browse/JBSEAM-1966?page=comments#action_12379322 ]
Przemyslaw Jaskierski commented on JBSEAM-1966:
-----------------------------------------------
Hi Yannick,
Please upgrade priority and target this on 2.0.1 GA - there is already one optimization task in that milestone, and the one you are reporting is important as well.
> Code optimization in Component class
> ------------------------------------
>
> Key: JBSEAM-1966
> URL: http://jira.jboss.com/jira/browse/JBSEAM-1966
> Project: JBoss Seam
> Issue Type: Feature Request
> Reporter: Yannick Lazzari
> Priority: Minor
>
> 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