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 2015/09/18 14:09:04 UTC

[jira] [Commented] (WICKET-5983) O(n^2) complexity in MarkupContainer.add

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

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

Commit 7b49be52e1a082d910147d28a34961fe6fba13af in wicket's branch refs/heads/WICKET-5981 from [~papegaaij]
[ https://git-wip-us.apache.org/repos/asf?p=wicket.git;h=7b49be5 ]

WICKET-5983: mostly linear performance in MarkupContainer.add


> O(n^2) complexity in MarkupContainer.add
> ----------------------------------------
>
>                 Key: WICKET-5983
>                 URL: https://issues.apache.org/jira/browse/WICKET-5983
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.5.13, 6.20.0, 7.0.0
>            Reporter: Emond Papegaaij
>            Assignee: Emond Papegaaij
>            Priority: Minor
>
> MarkupContainer.add has O(n^2) complexity on the number of childs, because it searches through all other childs for a child with the same id. This may not be much of a problem in most situations, but in large tables, the performance can get very bad.
> Constructing a table with n rows, with 6 cells in each row takes (10k iterations) in Wicket 6.20.0 (Wicket 7 should be comparable, but WICKET-5981 kills perfomance badly):
>   10 ->   132ms
>   20 ->   245ms
>   40 ->   465ms
>   80 ->  1000ms
>  160 ->  2444ms
>  320 ->  6989ms
>  640 -> 23201ms
> 1280 -> 80784ms



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)