Have you ever had to build a treeview control for a website and then find once in production people start complaining about slow response times?
It appears that most of the treeview controls I've come across work in one of two ways:
1) they load all of the data for the tree in one go - (for trees with more than 100 nodes - this is BAAADDDD!!!)
2) they require a server-round trip resulting in the whole tree being re-rendered! - (not very elegant)
Neither solution is ideal. Why should we bother loading in the whole tree when the chances are that the user only ever wants to look at a very small fraction of the tree ?!
Aurigma have provided a great guide on how to build one of these deep trees. I use a variation on this with the tree modelled within SQL Server as nested sets. If you need to perform a tree re-sync (ie. reload the tree with the nodes expanded to the node you request) then you can extract the required nodes in a single SELECT statement.
|re: Deep tree syndrome
Could you perhaps post your code so that I can see how you are using DeepTree with SQL?