the problem is that in the ListView/MarkupContainer the adding of new Items
as child will cause quite some stuff now
It will be searched over twice. First by Listview to find an existing Item
(we could optimize this a bit but only a bit)
then when you add it it will be searched over again.

After that it is added. And the add is now pretty simple and can maybe
improved a bit (but then i hope not take loads of memory again)
because every add currently does create a array with size +1 and copies the
rest over.
thats also pretty poor that you really see with these kind of tests

johan



On Feb 19, 2008 3:26 PM, Leucht, Axel <[EMAIL PROTECTED]> wrote:

> Hi,
>
> Though I'm very impressed by wicket, I do have a question concernig the
> performance of wicket.
>
> A simple WebPage just iterates over a list of data and inserts a
> href-Element in the resulting page. It works, but is incredibly slow (runs
> minutes), whereas a similar JSP-Page finishes in seconds, and I wonder
> whether I can do something about it. Yes, I know, generating HTML with
> 100.000 elements is senseless but gives me a hint whether wicket can
> handle application like this or dies for whatever resaons.
>
> Here is my little TestPage:
> public class LastTestPage extends WebPage {
>
>        public LastTestPage() {
>                List<String> list = new ArrayList<String>();
>                for (int i=0; i<100000; i++) {
>                        System.out.println(i);
>                        list.add(new String("Row:"+i));
>                }
>                add(new ListView("listView", list)
>                 {
>                        public void populateItem(final ListItem item)
>                        {
>                                String s1 = (String) item.getModelObject();
>                                item.add(new Label("href", s1));
>                                System.out.println(s1);
>                        }
>                 });
>                        }
>
> }
>
> /Axel
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to