You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Werner Punz (Resolved) (JIRA)" <de...@myfaces.apache.org> on 2011/10/21 11:34:32 UTC

[jira] [Resolved] (MYFACES-3365) jsf.js: getProjectStage speed improvement

     [ https://issues.apache.org/jira/browse/MYFACES-3365?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Werner Punz resolved MYFACES-3365.
----------------------------------

    Resolution: Fixed
    
> 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