Return-Path: X-Original-To: apmail-myfaces-dev-archive@www.apache.org Delivered-To: apmail-myfaces-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4F599674A for ; Tue, 19 Jul 2011 15:33:22 +0000 (UTC) Received: (qmail 27442 invoked by uid 500); 19 Jul 2011 15:33:22 -0000 Delivered-To: apmail-myfaces-dev-archive@myfaces.apache.org Received: (qmail 27408 invoked by uid 500); 19 Jul 2011 15:33:21 -0000 Mailing-List: contact dev-help@myfaces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "MyFaces Development" Delivered-To: mailing list dev@myfaces.apache.org Received: (qmail 27401 invoked by uid 99); 19 Jul 2011 15:33:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jul 2011 15:33:21 +0000 X-ASF-Spam-Status: No, hits=-2001.1 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Jul 2011 15:33:19 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id B46A44475A for ; Tue, 19 Jul 2011 15:32:57 +0000 (UTC) Date: Tue, 19 Jul 2011 15:32:57 +0000 (UTC) From: "Prakash Udupa (JIRA)" To: dev@myfaces.apache.org Message-ID: <1594566186.4279.1311089577735.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <536835571.4269.1311089217865.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (TRINIDAD-2121) ChangeManager optimization - Apply ChangeManager customizations only during render response MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/TRINIDAD-2121?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Prakash Udupa updated TRINIDAD-2121: ------------------------------------ Status: Patch Available (was: Open) > ChangeManager optimization - Apply ChangeManager customizations only during render response > ------------------------------------------------------------------------------------------- > > Key: TRINIDAD-2121 > URL: https://issues.apache.org/jira/browse/TRINIDAD-2121 > 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: http://www.atlassian.com/software/jira