You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2017/04/03 09:19:41 UTC

[jira] [Commented] (WICKET-6351) Form.anyFormComponentError performance degradation

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

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

Commit f734ad6764bc6c1c7bfc0fa09e85db27d7510d50 in wicket's branch refs/heads/master from [~mgrigorov]
[ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=f734ad6 ]

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)