You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org> on 2011/05/30 22:47:47 UTC

[jira] [Created] (MYFACES-3160) [PERF] TagAttributeImpl part II: object allocations (cache ELExpressions)

[PERF] TagAttributeImpl part II: object allocations (cache ELExpressions)
-------------------------------------------------------------------------

                 Key: MYFACES-3160
                 URL: https://issues.apache.org/jira/browse/MYFACES-3160
             Project: MyFaces Core
          Issue Type: Improvement
          Components: JSR-314
            Reporter: Leonardo Uribe
            Assignee: Leonardo Uribe


See discussion on:

http://markmail.org/message/kca64ojdvb6em367?q=%5Bcore%5D+performance:+TagAttributeImpl+part+II:+object+allocations



--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (MYFACES-3160) [PERF] TagAttributeImpl part II: object allocations (cache ELExpressions)

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACES-3160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leonardo Uribe updated MYFACES-3160:
------------------------------------

    Status: Patch Available  (was: Open)

> [PERF] TagAttributeImpl part II: object allocations (cache ELExpressions)
> -------------------------------------------------------------------------
>
>                 Key: MYFACES-3160
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3160
>             Project: MyFaces Core
>          Issue Type: Improvement
>          Components: JSR-314
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>         Attachments: MYFACES-3160-1.patch
>
>
> See discussion on:
> http://markmail.org/message/kca64ojdvb6em367?q=%5Bcore%5D+performance:+TagAttributeImpl+part+II:+object+allocations

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (MYFACES-3160) [PERF] TagAttributeImpl part II: object allocations (cache ELExpressions)

Posted by "Martin Kočí (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-3160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13050659#comment-13050659 ] 

Martin Kočí commented on MYFACES-3160:
--------------------------------------

Cool, thanks for implementing it! 
I'll deploy this with CACHE_EL_EXPRESSIONS=always for our qa-team asap and will do some stress tests too.

> [PERF] TagAttributeImpl part II: object allocations (cache ELExpressions)
> -------------------------------------------------------------------------
>
>                 Key: MYFACES-3160
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3160
>             Project: MyFaces Core
>          Issue Type: Improvement
>          Components: JSR-314
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>             Fix For: 2.0.8, 2.1.2
>
>         Attachments: MYFACES-3160-1.patch, MYFACES-3160-2.patch, MYFACES-3160-3.patch, MYFACES-3160-4.patch, MYFACES-3160-5.patch, MYFACES-3160-8.patch, MYFACES-3160-9.patch
>
>
> See discussion on:
> http://markmail.org/message/kca64ojdvb6em367?q=%5Bcore%5D+performance:+TagAttributeImpl+part+II:+object+allocations

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

[jira] [Commented] (MYFACES-3160) [PERF] TagAttributeImpl part II: object allocations (cache ELExpressions)

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-3160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13043170#comment-13043170 ] 

Leonardo Uribe commented on MYFACES-3160:
-----------------------------------------

Attached patch (MYFACES-3160-5.patch) with solution for cache only expressions that does not require any VariableMapper resolved variables. Great!

> [PERF] TagAttributeImpl part II: object allocations (cache ELExpressions)
> -------------------------------------------------------------------------
>
>                 Key: MYFACES-3160
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3160
>             Project: MyFaces Core
>          Issue Type: Improvement
>          Components: JSR-314
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>         Attachments: MYFACES-3160-1.patch, MYFACES-3160-2.patch, MYFACES-3160-3.patch, MYFACES-3160-4.patch, MYFACES-3160-5.patch
>
>
> See discussion on:
> http://markmail.org/message/kca64ojdvb6em367?q=%5Bcore%5D+performance:+TagAttributeImpl+part+II:+object+allocations

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (MYFACES-3160) [PERF] TagAttributeImpl part II: object allocations (cache ELExpressions)

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-3160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13049449#comment-13049449 ] 

Leonardo Uribe commented on MYFACES-3160:
-----------------------------------------

Attached corrected patch (MYFACES-3160-8) after commit solution for MYFACES-3169.

After thinking about this issue, the param to activate the this improvement works like this:

    /**
     * Indicates if expressions generated by facelets should be cached or not. Default is noCache. There there are four modes:
     * 
     * <ul>
     * <li>always: Only does not cache when expressions are inside user tags or the expression contains a variable resolved using VariableMapper</li>
     * <li>allowCset: Like always, but does not allow cache when ui:param was used on the current template context</li>
     * <li>strict: Like allowCset, but does not allow cache when c:set with var and value properties only is used on the current page context</li>
     * <li>noCache: All expression are created each time the view is built</li>
     * </ul>
     * 
     */
    @JSFWebConfigParam(since="2.0.8", defaultValue="noCache", expectedValues="noCache, strict, allowCset, always")
    public static final String INIT_PARAM_CACHE_EL_EXPRESSIONS = "org.apache.myfaces.CACHE_EL_EXPRESSIONS";

With the corrections done on c:set and ui:param, we can limit effectively the "scope" of the variables and detect early if we should cache it or not. The latest evidence shows it is not possible to set the improvement to other value than noCache by default, so the best is let the user decide to cache or not expressions, and the mode that applies for your project.

> [PERF] TagAttributeImpl part II: object allocations (cache ELExpressions)
> -------------------------------------------------------------------------
>
>                 Key: MYFACES-3160
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3160
>             Project: MyFaces Core
>          Issue Type: Improvement
>          Components: JSR-314
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>         Attachments: MYFACES-3160-1.patch, MYFACES-3160-2.patch, MYFACES-3160-3.patch, MYFACES-3160-4.patch, MYFACES-3160-5.patch, MYFACES-3160-8.patch
>
>
> See discussion on:
> http://markmail.org/message/kca64ojdvb6em367?q=%5Bcore%5D+performance:+TagAttributeImpl+part+II:+object+allocations

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (MYFACES-3160) [PERF] TagAttributeImpl part II: object allocations (cache ELExpressions)

Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACES-3160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leonardo Uribe resolved MYFACES-3160.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1.2
                   2.0.8

> [PERF] TagAttributeImpl part II: object allocations (cache ELExpressions)
> -------------------------------------------------------------------------
>
>                 Key: MYFACES-3160
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3160
>             Project: MyFaces Core
>          Issue Type: Improvement
>          Components: JSR-314
>            Reporter: Leonardo Uribe
>            Assignee: Leonardo Uribe
>             Fix For: 2.0.8, 2.1.2
>
>         Attachments: MYFACES-3160-1.patch, MYFACES-3160-2.patch, MYFACES-3160-3.patch, MYFACES-3160-4.patch, MYFACES-3160-5.patch, MYFACES-3160-8.patch, MYFACES-3160-9.patch
>
>
> See discussion on:
> http://markmail.org/message/kca64ojdvb6em367?q=%5Bcore%5D+performance:+TagAttributeImpl+part+II:+object+allocations

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira