myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <>
Subject [jira] [Commented] (MYFACES-3160) [PERF] TagAttributeImpl part II: object allocations (cache ELExpressions)
Date Tue, 14 Jun 2011 21:46:47 GMT


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

This message is automatically generated by JIRA.
For more information on JIRA, see:


View raw message