2

I have a rather large tree grid of clients (total tree size 3000 but the one node has 1500 children). Its an adjacency model tree and I only load the data thats needed (Ajax call when I expand each node).

Performance is great on nodes that don't have many children and even when expanding the big node but whenever i collapse the big node I get an alert saying:

Stop running this script?

A Script on this page is causing your web browser to run slowly. If it continues to  run, your computer might become unresponsive. 

Its not retrieving the data that is slow but is the client side manipulation of the tree.

1) Are there any settings that I can apply to increase the performance? I've tried gridview = true but I don't think that has any effect for tree grids.

2) Does rowNum have any effect on tree grids?

3) I'm using v3.7.2 - would upgrading to v4 make any difference?

4) If I can't get this to work smoothly can you recommend another tree grid? I've used JQGrid with great success throughout our app and would be a sad panda if I have to find another solution :(

Cheers!

Oleg
  • 220,925
  • 34
  • 403
  • 798
woggles
  • 7,444
  • 12
  • 70
  • 130

2 Answers2

3

First of all you should upgrade from 3.7.2 version to the version 4.0.0. In the 4.0 version of jqGrid the tree grid was changes to support gridview:true which is very important in case of large number of rows/nodes.

If the performance after the upgraging will still not sufficient you should post full grid definition and post the URL where the test JSON/XML data can be downloaded. Then one could debug the problem and probebly gives you more recommendations.

Oleg
  • 220,925
  • 34
  • 403
  • 798
  • Thanks Oleg - did 2 things to improve performance: upgraded to version 4 and used gridview:true and the original rows were being return with javascript in the grid data (to open popup for selected row) so i moved that data out of the grid – woggles Jun 08 '11 at 20:07
  • I was revisiting the performance issues again this morning. The node that is giving me issues has around 700 records (JSON data for the node: http://pastebin.com/XrMxuiFR). Notice that we have GUIDs for the IDs. The performance is fine in chrome but I still get the error in IE (which can be removed by modifying a registry setting http://support.microsoft.com/kb/175500). Is there a way to possibly strip out unneeded styling to increase the performance? Thanks – woggles Dec 28 '11 at 12:02
  • @woggles: I don't think that the styling is the reason of the performance problems. You should open new question and post the code which you use for the grid currently. Moreover at least one row of JSON data could be helpful. The best is always the full working demo which can be used to reproduce the problem. – Oleg Dec 28 '11 at 12:22
  • @Oleg: I am also loading treegrid data at once and it is taking so much time to render the tree and also on collapse it is giving me that Stop Running script? prompt in IE. I have gridview: true and my data on collapse could be around 300 rows... – varaprakash Mar 01 '12 at 22:40
  • @varaprakash: You should post mostly full information which can be used to reproduce the problem. If the data are private you can replace there to dummy data. Important is only to be able to reproduce the problem. – Oleg Mar 01 '12 at 22:42
  • @Oleg: I have posted a question to reproduce this issue. Please check [here](http://stackoverflow.com/questions/9574708/jqgrid-treegrid-performance-issues-in-ie8), thanks... – varaprakash Mar 05 '12 at 22:02
1

Try to use only those links and Style sheet which is applicable for the that grid. Unnecessary links and Style sheet effects the performance and might be a cause of conflicting. This will increase the time of file loading as well as effect the bandwidth also.