jsf.js: getProjectStage speed improvement
-----------------------------------------

                 Key: MYFACES-3365
                 URL: https://issues.apache.org/jira/browse/MYFACES-3365
             Project: MyFaces Core
          Issue Type: Improvement
            Reporter: Werner Punz
            Priority: Minor


The getProjectStage in our impl is suboptimal performancewise because it is 
implemented purely functional. But our implementation is an imperative 
singleton, so we can apply the singleton pattern to the method as well and safe 
the state after the first determination for future access. This should save us 
a little bit of time because we do not have to parse the script tags every time.
Also the 4 == in the if are slower than a direct map lookup. The code becomes 
tighter that way as well.




--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to