myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leonardo Uribe (JIRA)" <...@myfaces.apache.org>
Subject [jira] [Comment Edited] (MYFACES-3863) Possible performance enchanchment in postback lifecycle processing
Date Sat, 01 Mar 2014 15:47:19 GMT

    [ https://issues.apache.org/jira/browse/MYFACES-3863?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13917100#comment-13917100
] 

Leonardo Uribe edited comment on MYFACES-3863 at 3/1/14 3:46 PM:
-----------------------------------------------------------------

JSF lifecycle already provides a way to skip validation. Just create a phase listener and
call facesContext.renderResponse() after restore view phase and that's it. The evidence suggest
compared with the time spent rendering the response, execute the lifecycle is really fast.
You hardly gain something doing that, but it is up to you.


was (Author: lu4242):
JSF lifecycle already provides a way to skip validation. Just create a phase listener and
call facesContext.renderResponse() after restore view phase and that's it. The evidence suggest
compared with the time spent rendering the response execute, the lifecycle is really fast.
You hardly gain something doing that, but it is up to you.

> Possible performance enchanchment in postback lifecycle processing
> ------------------------------------------------------------------
>
>                 Key: MYFACES-3863
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3863
>             Project: MyFaces Core
>          Issue Type: Improvement
>            Reporter: Karl Trumstedt
>            Priority: Minor
>
> Hello,
> I've been looking and reading a lot about JSF's lifecycle. I'm no expert in any sense
and have not fully grasped what happens in each phase.
> I have debugged our application and seen how much time is spent in each cycle. For larger
pages it can be quite a lot (500 ms for each APPLY, VALIDATION, UPDATE). Even for smaller
pages there can be ~10-20ms in the cycle when posting to the server. As far as I have gathered,
the component tree is traversed for each of these cycles. For us, every ms counts :)
> Now, my application doesn't use the JSF validation framework. There isn't any <f:validator>
stuff anywhere. For me, I don't see that I need to execute that phase, ever. So I would like
to turn off that phase. But even better, maybe when parsing the XHTML facelet (or constructing
the view or something), couldn't the UIViewRoot have information on if there are any <f:validator>
stuff on the page? If not, it could skip the validation phase completely? 
> As I said, I don't fully grasp what's happening behind the scenes so maybe something
else would stop working? And maybe the validation phase does more the execute <f:validator>
tags.
> I realize this scenario might be special since we don't use the <f:validator> stuff,
we reuse our own legacy validation framework, but there still could be pages in a regular
JSF application with lots of components (big tables etc) and no validation (or custom validation).
Any pointers for how I could patch and skip the validation phase myself would be nice:)
> Thanks



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message