改善JQGrid树形网格的性能 [英] Improving JQGrid Tree Grid performance

查看:128
本文介绍了改善JQGrid树形网格的性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个相当大的客户端树状树(树的总大小为3000,但一个节点有1500个子节点).它是一个邻接模型树,我仅加载所需的数据(在我扩展每个节点时调用Ajax).

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)我可以应用任何设置来提高性能吗?我已经尝试过gridview = true,但是我认为这对树形网格没有任何影响.

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)rowNum对树形网格有影响吗?

2) Does rowNum have any effect on tree grids?

3)我正在使用v3.7.2-升级到v4会有什么不同吗?

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

4)如果无法正常工作,可以推荐另一个树状网格吗?我在整个应用程序中使用JQGrid都取得了巨大的成功,如果我必须找到其他解决方案,那将是可悲的熊猫:(

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 :(

干杯!

推荐答案

首先您应该从3.7.2版本升级到4.0.0版本.在jqGrid的4.0版本中,对树状网格进行了更改以支持gridview:true,这在行/节点数量众多的情况下非常重要.

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.

如果升级后的性能仍然不够,则应发布完整的网格定义,并发布可以下载测试JSON/XML数据的URL.然后可以调试问题,并为您提供更多建议.

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.

这篇关于改善JQGrid树形网格的性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆