I have never tried using StackPanel like that, but I did look at it's
code once to enhance it and I think it is at least as "complicated" as
Tree (in the sense it has many HTML "boxes") so I would guess it would
probably be if anything worse than Tree in your situation.

The classic way to deal with large trees is to lazy load them by
layer, but obviously that is not an option for you as you only have
one layer.

I think you'll have to figure out a creative way to design a widget to
deal with this edge case (1000 items). It's a bit difficult to suggest
anything because we don't know either the contents of the tree nodes
(what these 100 items are) or how they are used (presume user selects
them?)

One idea that that immediately occurred to me was to use
DisclosurePanels. This has a right pointing triangle when closed, and
when clicked reveals the contents, rather like clicking the + on a
Tree. I am assuming also that the problem is purely rendering and that
there is no time problem fetching the 1000 items over RPC. You could
make a Composite widget like so:

Choose a container, could be FlowPanel, VerticalPanel etc
Keep a list of the items as a member of this class, and a cursor to
keep an index against the list
Set a maximum number to be rendered at any one time, say a few more
than your happy days case of <=10
Iterate through the list making DisclosurePanels and adding them to
the container as you go
If the list size > your chosen max, add a button bar to the bottom
giving forward/back options

Etc, I'm sure you get the idea. I think rendering 10 - 15
DiclosurePanels at a time will probably be quick enough.



On Mar 11, 5:49 am, GWTFan <[email protected]> wrote:
> I read the 
> threadhttp://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa...
> on tree performance.
>
> We are having a similar issue with the tree, where most of the cases
> it would have 1-10 items. However rarely it would have 500-1000 items,
> which slows down IE badly.
>
> Ours is just one level hierarchy and I don't really need tree. Do you
> think using a stack panel would be faster than tree?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to