putting a 100000 components into a page is ill advised even if they
are under different parents. what is the usecase you are trying to
implement?

-igor

On Tue, Mar 26, 2013 at 8:07 AM, Marco Springer <ma...@glitchbox.nl> wrote:
> Hi,
>
> Lets say I have about ~100.000 of MarkupContainer objects that I want to put
> into a ListView or RepeatingView.
> This works fine functional wise... It's rather slow though.
>
> It boils down to:
> MarkupContainer:
> 1309 private Component put(final Component child)
> 1310    {
> 1311            int index = children_indexOf(child);
> 1312            if (index == -1)
> 1313            {
> 1314                    children_add(child);
> 1315                    return null;
> 1316            }
> 1317            else
> 1318            {
> 1319                    return children_set(index, child);
> 1320            }
> 1321    }
>
> and the call to "children_indexOf(child)" where it loops over all it's
> existing children and compares the id's until a match is found.
> With an increasing amount of children this can get rather slow...
>
> I though off overruling some functionality in the MarkupContainer class since
> I'm sure that for this list of items the children will be unique in their id
> and don't need that lookup, and overruling the "put" or "children_indexOf"
> function would give me enough power to skip that performance impacting part.
> But most functions have private access, leaving me nothing to control the
> adding of child components to a MarkupContainer.
>
> Does anyone else have experience with adding rather large quantities to
> something like the ListView and/or RepeatingView?
> Or is there another way of rendering this large amount of containers?
>
> Thanks in advance.
>
> Kind regards,
> Marco

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to