You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2017/04/10 07:54:41 UTC

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

     [ https://issues.apache.org/jira/browse/WICKET-6351?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov updated WICKET-6351:
------------------------------------
    Fix Version/s:     (was: 7.8.0)
                       (was: 6.28.0)
                   7.7.0
                   6.27.0

> 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
>             Fix For: 6.27.0, 7.7.0, 8.0.0-M6
>
>
> 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)