Performance Issue with Tree View

Nov 16, 2012 at 5:13 PM

Hi,

 We  have tested and using treeview and it is working as expected except one scenario and have a very good support from your side.

In our case 100+ nodes are present within tree on dialog box. when we submit tree it took 1-2 minute to go into the controller function and controller function is executing as much  faster it means issue is with submitting tree to server.

Please let me know how to improve performance in this scenario.

Please help me out.

Thanks In advance.

 

Thanks,

Ganesh

Coordinator
Nov 17, 2012 at 2:02 AM

Consider that there is an overhead of 3 input field for each tree node+the input fields you use in each node. So i this number becomes very high...the only solution is splitting the tree into different pages. That is in a first page the user just edit the top level nodes, than by clickin a link in any top level node the user open that branch into a different page.

 

However maybe there is some problem in the way you submit the data. As a first experiment run the program WITHOUT DEBUGGING. Compile in release mode and then choose run without debugging in the VS debug menu. If this solve the issue...done. Otherwise let me know how do you submit the tree. Via ajax? If yes what is the code of the ajax call?

Coordinator
Nov 18, 2012 at 9:49 PM

Give also a look to the last post I have done in this thread: http://mvccontrolstoolkit.codeplex.com/discussions/400349

There I give a list of methods to reduce the number of tree nodes loaded and submitted than might help you. However, while in that other case there was also a loading problem because the tree is actually big, in your case I have doubts that something has been done in the wrong way(It maybe just the debug mode that creates problems).

Coordinator
Dec 14, 2012 at 7:41 PM

In the Next Rlease of the Mvc Controls Toolkit the load time of big trees will be improved because nodes are processed when they are opened, so it swill be acceptable to load big trees with closed nodes.

Dec 17, 2012 at 7:16 AM

Frank,

Thanks for your information.

Can you please tell me when it will release?

Thanks,

Ganesh

Coordinator
Dec 17, 2012 at 9:56 AM

It will be released within a couple of weeks. However, the performance improvement will be just on the load time, not on the submit time. The only way to reduce the submit time is by reducing the number of fields sent to the controller. This can be done with two techniques: 

  1. by using client based techniques. This way we send to the browser a complete ViewModel with all tree nodes data and create the tree on the client side. Than this ViewModel is tsubmitted into an unique hidden field in json format
  2. only the nodes that actually changed are sent to the server. This can be done with changes tracking techniques.

The tree of the Mvc Controls Toolkit is based on server techniques, that means the whole tree is rendered by the server. So the above two optimizations CANNOT be applied. However I am going to release the DataMoving plugin for the Mvc Controls Toolkit that contains a client based tree that performs both the above optimizations. Give a look to this video: http://youtu.be/djrr_rWCmxI