Actually, there are several reasons why this user control is so slow, all of them having to do with bad design.
First, the protected property Tabs is reference often in the ascx file. See its definition here:
protected List<TabInfo> Tabs
{
get
{
return TabController.GetPortalTabs(rblMode.SelectedValue == "H" ? Null.NullInteger : PortalId, Null.NullInteger, false, true, false, true);
}
}
Exactly... Every time it's referenced, the GetPortalTabs method is called. That means, for example, every time AddChildNodes is called (which is called for each and every node). For my site, that means over 1000 times on a page load.
Just fixing this issue will be like night and day. I shaved 30 - 45 seconds off of a page load simply by storing the info in a session object. You could do it with caching, set a property on the init or any other method, as long as it's only being called once.
Second, the tree view is extremely inefficient. It loads everything all at once during the . It doesn't rely on dynamically loading the information, although it looks like some attention was given to that possibility at one time, the way it's been designed. RadTreeView is capable. I'm currently on rewriting this control for just that capability...
And there are more bad design decisions there, but I'm not going to nitpick as I couldn't do too much better....
Cheers,