Treeview loading time

Oct 19, 2011 at 6:42 PM

If there are large number of levels and list of items in the treeview, it takes a while to load the treeivew and on firefox you get a prompt which says

Warning - Unresponsive script

A script on the page may be busy or it may have stopped responding.....

it comes for jquery-1.6.1.min.js


What could be the best way to avoid this?

Oct 19, 2011 at 7:33 PM
Edited Oct 19, 2011 at 11:40 PM

give me some numbers, how many items, how many levels. Is the treeview in display only mode? Or you supplied also edit templates?

Oct 20, 2011 at 2:55 AM
Edited Oct 20, 2011 at 3:01 AM

8 root levels.

Maximum nesting up to 9 levels for 6 root levels out of 8.

Minimum nesting up to 4 levels

Treeview is in Edit mode with all levels Expanded.

Is there a way where i can send you a screenshot?

Oct 20, 2011 at 7:48 AM

Iou can send it through the contact form of my blog: 

In the meantime, please do some experiment to discover the main cause of the slowing:


1) As a first step do a copy of your project...

2) Try to set the CanMove option of the TreeViewOption data structure to false. This will disable node dragging. See if the slowing disappear...and let me know it. It is likely that the cause of slowing is the addition of moving capabilities to each node.

2) Try To set the CanAdd of the same DataStructure to false to disable addition of new nodes. This will avoid some housekeeping of the templates used to create new nodes. I don't think this is the cause of the slowing....It might be only if you use a lot of different node templates(say more than 10...but it depends also from the complexity of templates.)


3) Try with the TreeView in simple display mode. This means putting to null all edit related arguments (mainly the edit templates). 


Let me know the results of all the above tests. I am preparing a bug fix release of the Mvc Controls Toolkit that fix some bugs and the last "undesirable features", It is scheduled for nex monday, I cannot delay it too much, because at the moment the Mvc Controls Toolkit has an issue in partial thrust....that is causing too many problems to the users. If there is some improvement I can do...I will put it in this release.

Nov 3, 2011 at 1:50 PM

Sorry, i have been very busy and didnt get time to reply back.

i will get back to you on this by monday.