Hi,
I have a TreeView with a lot of nodes. When I try to show or manipulate this the browser scripts take a long time.
I found the VirtualScroll property but setting this on my tree causes it to hang when I try to expand a node.
What is the best way to show a TreeView with a large number of nodes?
TIA
Nic
Hi Tim, Hi Nic
we have put together a sample that illustrates the usage and benefits of LazyLoading and VirtualScrolling:
http://wisej.s3.amazonaws.com/support/attachments/Wisej.TreeViewLargeDataSet.zip
It requires the latest development build (1.5.42).
Please let me quickly explain what to use when and how:
These 2 features can be used regardless of VirtualScrolling.
However if you have too many nodes, at one point, the browser itself may become sluggish.
That´s where VirtualScrolling = true comes in quite handy. It lets Wisej client side only create the elements
for the visible portion of the TreeView.
Only VisualScrolling = true makes the client faster by creating only few elements. But if the server has
to send to the client e.g. 20.000 nodes it will still take some time to transfer and parse the data.
So finally a combination of VirtualScrolling, LazyLoading and IsParent with empty nodes can solve
virtually any issue with the performance of large TreeViews.
Hope that helps.
Best regards
Frank
Thanks Frank,
Looking forward to trying this out over the next couple of days.
Excellent service from the WiseJ team once again.
Nic
Hi Tim, Hi Nic,
the problems with the VirtualScrolling have been fixed and the new build is in the final testing
and most likely be released tomorrow.
We will also publish a sample that shows the usage and benefit of LazyLoad and VirtualScrolling
and a few more explanations for it.
But since it requires the latest build, I will publish it right after the new release.
Thanks for your patience.
Best regards
Frank
I am also looking forward to the new release and sample. I had taken a look issue I was having and it was still running slow with lots of nodes on the latest version. Hoping this takes care of my issues!
Thanks! Tim
Thanks Luca,
Lazy loading sounds interesting too. I’m not sure I have 500,000 nodes but I have enough that loading them on demand would be very beneficial.
Look forward to the sample and the fix.
Thanks again
Nic
It’s probably timing out.
There is a bug with the VirtualScrolling and selection. It’s fixed and will be in the next dev or release build. I tried with half a million nodes using VirtualScroling and LazyLoading and it works very well now. In general, LazyLoading lets you populate nodes when they are expanded the first time. Virtual scrolling limits the rendering to the visible area of the control.
Wisej already sends to the client only the nodes that are made visible (the parent has been expanded) but when everything has to be rendered it becomes too heavy for the browser unless virtual scrolling is used. I’ll upload a sample here that shows the differences, that’s the one I used to test the 500,000 nodes.
Please login first to submit.