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 (Commented) (JIRA)" <ji...@apache.org> on 2011/12/05 13:13:39 UTC

[jira] [Commented] (WICKET-4278) Performance regression in Component.configure() in 1.5

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

Martin Grigorov commented on WICKET-4278:
-----------------------------------------

Actually the caching of the locale can be applied. We can null-ify it in Component#onDetach().

                
> Performance regression in Component.configure() in 1.5 
> -------------------------------------------------------
>
>                 Key: WICKET-4278
>                 URL: https://issues.apache.org/jira/browse/WICKET-4278
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5.3
>            Reporter: Martin Grigorov
>            Assignee: Martin Grigorov
>         Attachments: WICKET-4278.patch, WICKET-4278.patch, myproject-1.4.tgz, myproject-1.5.tgz
>
>
> Wicket 1.5 is slower than 1.4 in rendering deep component trees.
> See the attached application that adds recursively components with specified depth. In 1.5 it is several times slower than 1.4.
> I found several problems:
> 1) org.apache.wicket.Component.configure() calls org.apache.wicket.Component.setRenderAllowed()
> The problems is that configure() is called for each component in the hierarchy and  setRenderAllowed() is overwritten in MarkupContainer to visit all children and call it for them. And the final result is that setRenderAllowed() is called for the parent and all its children, then for the first child and all its children again, and so on...
> The solution is to completely remove org.apache.wicket.MarkupContainer.setRenderAllowed()
> 2) If you increase the number of components to > 1000 in 1.5 we hit StackOverflowError in 
> 2.1) org.apache.wicket.MarkupContainer.getMarkupType()
> 2.2) org.apache.wicket.Component.getLocale()
> 2.3) org.apache.wicket.MarkupContainer.internalMarkRendering(boolean)
> For 2.1 and 2.2 I suggest to add transient fields which will cache the calculated value after the first call of the get method.
> For 2.3 I don't see a solution for now

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira