Home - Forums-.NET - FlyTreeView (ASP.NET) - Databinding - XML Document with 10,000 nodes

FlyTreeView (ASP.NET)

Technical support and KB related to the FlyTreeView control

This forum related to following products: FlyTreeView for ASP.NET

Databinding - XML Document with 10,000 nodes
Link Posted: 22-May-2008 13:53
Hi,

We are planning to create an Xml document with 10,000 nodes and use it as Datasource for the flytreeview.
Will we have any performance prob and any tips to over come that?

Note:- We don't want the Tree view to be expanded i.e we just want to see the First level nodes on load.

Thanks in advance..
Link Posted: 22-May-2008 22:17
10,000 nodes means that databinder will call Eval (that uses reflection) n*10,000 (where n is number of properties to databound). This will definitely cause performance problems.

So the only way I see is to bind each level of nodes on demand (when user expands some node). This will require some coding to select needed nodes using XPath expression.
Link Posted: 25-Jul-2008 02:19
We evaluated the NineRays Tree Control as we have a tree with  (currently) 2,500 nodes
in it, and it simply crippled ASP.Net / VS2005.   It made their TreeView useably slow.

So, how fast is it, binding this .xml file to a NineRays tree instead ?

Well, it's been hogging my CPU for the past 7 minutes, and my IE window looks as though
it's gone into a coma.   Time to give up on that one.


Your 10,000 node XML document may not be particularly nippy...


Mike
Link Posted: 25-Jul-2008 02:43
Mike,

Of course it will take much time. Every node is a complex HTML structure. And of course 2500 is too much for this. Just create a big HTML file and open it with browser. It will be slow.

Anyway, there is "populate on demand". This is what is supposed to be used in such cases.
File system example is a classical one:
http://www.9rays.net/asp.net_2/treeview/Demo_Vista.aspx
Same approach can be used for XML, DB, whatever.