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

ASF subversion and git services commented on WICKET-6351:
---------------------------------------------------------

Commit 24500049ddeedfb6d536f07326f002e923c72a33 in wicket's branch 
refs/heads/wicket-7.x from [~mgrigorov]
[ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=2450004 ]

WICKET-6351 Form.anyFormComponentError performance degradation


> Form.anyFormComponentError performance degradation
> --------------------------------------------------
>
>                 Key: WICKET-6351
>                 URL: https://issues.apache.org/jira/browse/WICKET-6351
>             Project: Wicket
>          Issue Type: Improvement
>    Affects Versions: 7.6.0, 8.0.0-M4
>            Reporter: Lajos Gáthy
>            Assignee: Martin Grigorov
>            Priority: Minor
>
> This is related to the changes made in 
> https://issues.apache.org/jira/browse/WICKET-5883
> Inside the visitor instead of checking:
> if (component.isVisibleInHierarchy() && component.isEnabledInHierarchy() && 
> component.hasErrorMessage())
> it would be much better to do:
> if (component.hasErrorMessage() && component.isVisibleInHierarchy() && 
> component.isEnabledInHierarchy())
> This not only would save a lot of unnecessary computation when there is no 
> error on a component (most cases) but computing isEnabled() or isVisible() is 
> not trivial, but also would avoid reloading some detachable models too early 
> (before models change after form submit). An example for the later: when we 
> have a PagingNavigator where the PagingNavigationLink-s have autoEnable set 
> to true (which is the default), then computing isEnabled() for these link 
> would trigger model reload because PagingNavigationLink.linksTo(Page) needs 
> getPageNumber(). Not only this, but it will make 
> AbstractPageableView.getItemCount() cache the wrong itemCount (before model 
> update happens) and return that on render phase incorrectly.
> On the other hand I do not see any downside of changing the order of the 
> conditions so that hasErrorMessage() is computed before others.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to