[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3653) Remove String concat in ScopeType

Michael Youngstrom (JIRA) jira-events at lists.jboss.org
Thu Oct 30 16:14:33 EDT 2008


Remove String concat in ScopeType
---------------------------------

                 Key: JBSEAM-3653
                 URL: https://jira.jboss.org/jira/browse/JBSEAM-3653
             Project: Seam
          Issue Type: Bug
    Affects Versions: 2.1.0.GA, 2.0.3.CR1
            Reporter: Michael Youngstrom
            Assignee: Michael Youngstrom
             Fix For: 2.1.1.CR1


In my application profiling the SeamELResolver is an extremely hot spot.  This is one seemingly harmless fix that can be applied to minimally improve component lookup and hence SeamELResolver performance.  This fix may appear small but in my app this method is getting called thousands of times a page load.

Index: src/main/org/jboss/seam/ScopeType.java
===================================================================
--- src/main/org/jboss/seam/ScopeType.java	(revision 9465)
+++ src/main/org/jboss/seam/ScopeType.java	(working copy)
@@ -69,6 +69,12 @@
     */
    UNSPECIFIED;
    
+   private final String prefix;
+   
+   private ScopeType() {
+	   prefix = "org.jboss.seam." + toString();
+   }
+   
    public boolean isContextActive()
    {
       switch (this)
@@ -151,7 +157,7 @@
    
    public String getPrefix()
    {
-      return "org.jboss.seam." + toString();
+      return prefix;
    }
 
 }


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

        



More information about the seam-issues mailing list