Welcome Guest Search | Active Topics | Sign In | Register

How to load a TreeView as FAST as possible? Options
mburolla
Posted: Friday, April 17, 2009 3:10:48 PM
Rank: Advanced Member
Groups: Member

Joined: 4/13/2009
Posts: 37
I was wondering if you folks could provide any tips on how to load a TreeView with data as FAST as possible (obviously ignoring the backend calls to a database). For example, I'm loading a tree with 1,000 nodes and every even node has 1,000 other nodes (and that's it). Using the same coding scheme, the Telerik tree loads this data in seconds. Is there a way to speed up loading your tree?

Thanks,
Marty
eo_support
Posted: Friday, April 17, 2009 3:30:05 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

I am not sure whether I got your scenario correctly. When you say every even node has 1000 other nodes, do you mean it has 1000 child nodes? In that case you have a TreeView that contains about half a million nodes.

The best way to improvement TreeView performance is to reorganize the tree nodes. Most users are fine with navigating the TreeView with a multiple level drill down approach, but nobody will be happy with scrolling among 1000 nodes to find out the one that they are interested. It’s like browsing a folder with 1000 files. Its’ very hard to find the one that you wanted. So it’s not only a performance issue, but also a usability issue. So instead of having 1000 files all in one folder, you can consider organizing them into different sub folders.

Once you reorganize them into multiple levels, each level will contain less nodes and it will load much faster. Usually you should also use PopulateOnDemand for big TreeViews. You can find an example about PopulateOnDemand on our document site:

http://doc.essentialobjects.com

It populates sub nodes when user expands it. There is no point to load all nodes up front because for a particular user, he/she is only interested in what he is looking for. More than 99% of the total nodes would not be of his interest, and if rendered, would be a total performance waste.

Please feel free to let us know if you have any more questions.

Thanks!
mburolla
Posted: Friday, April 17, 2009 5:14:02 PM
Rank: Advanced Member
Groups: Member

Joined: 4/13/2009
Posts: 37
Ok, thanks. That's what I needed to know.

Just one more quick question about the TreeView. Is there a property that removes the restricting border on the TreeView control? In other words, when I open a node that contains 1,000 nodes, I'd like to be able to see all 1,000 nodes without scrolling the TreeView control.

Thanks,
Marty
eo_support
Posted: Friday, April 17, 2009 5:46:36 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

I believe you can set AutoScroll to false for that:

http://doc.essentialobjects.com/library/1/eo.web.treeview.autoscroll.aspx

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.