Hi all,

Martijn and I spent some more time measuring Wicket's performance, mostly in 
component tree construction. It turned out that code written bij Johan, back 
in the Wicket 1.2 time, causes O(n^2) complexity on the number children of a 
MarkupContainer. We've rewritten the entire children storage, using a 
LinkedHashMap when the number of children exceeds 24 (this number was found 
after some test trials). For smaller sizes, a simple ArrayList is used, which 
is more memory efficient.

The new code now has almost O(1) on adding/removing/get-by-id but O(n) on get 
by index. MarkupContainer.swap also is O(n).

Can someone take a look at the new code? MarkupContainer is a rather important 
class and if we want to put this in 7.1, it'd better be bug-free :)

Best regards,
Martijn and Emond

Reply via email to