myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prakash Udupa (JIRA)" <>
Subject [jira] [Updated] (TRINIDAD-2121) ChangeManager optimization - Apply ChangeManager customizations only during render response
Date Tue, 19 Jul 2011 15:32:57 GMT


Prakash Udupa updated TRINIDAD-2121:

    Status: Patch Available  (was: Open)

> ChangeManager optimization - Apply ChangeManager customizations only during render response
> -------------------------------------------------------------------------------------------
>                 Key: TRINIDAD-2121
>                 URL:
>             Project: MyFaces Trinidad
>          Issue Type: Improvement
>          Components: Facelets
>    Affects Versions: 2.0.1
>            Reporter: Prakash Udupa
>         Attachments: JIRA2121_Patch_over_trunk.patch
>   Original Estimate: 2h
>  Remaining Estimate: 2h
> Here is the hook-point currently for applying the changes that the SessionChangeManager
is holding on to:
> org.apache.myfaces.trinidadinternal.application.ViewDeclarationLanguageFactoryImpl.$ChangeApplyingVDLWrapper
> ...
>     @Override
>     public void buildView(FacesContext facesContext, UIViewRoot uiViewRoot)
>       throws IOException
>     {
>       _wrapped.buildView(facesContext, uiViewRoot);
>       ChangeManager cm = RequestContext.getCurrentInstance().getChangeManager();
>       cm.applyComponentChangesForCurrentView(FacesContext.getCurrentInstance());
>     }
> When the view root cache is turned on (org.apache.myfaces.trinidad.CACHE_VIEW_ROOT),
which is a typical configuration when partial state saving is enabled, the above code ends
up applying the customizations stored in the ChangeManager twice for the case of POST requests.
The suggested improvement is to just apply this only during the RENDER_RESPONSE phase, which
will optimally cover the new page request case and the postback case. Not only is this optimal,
but also robust, because this ensures that the state is all restored, and the customizations
can be safely applied just before rendering response.

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


View raw message