提高 JQGrid 树网格性能
我有一个相当大的客户端树网格(树的总大小为 3000,但一个节点有 1500 个子节点)。它是一个邻接模型树,我只加载所需的数据(当我展开每个节点时 Ajax 调用)。
在没有很多子节点的节点上,甚至在扩展大节点时,性能都很好,但每当我折叠大节点时,我都会收到一条警报:
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.
它不是检索缓慢的数据,而是客户端对树的操作。
1) 是否可以应用任何设置来提高性能?我尝试过 gridview = true ,但我认为这对树网格没有任何影响。
2)rowNum对树形网格有影响吗?
3) 我正在使用 v3.7.2 - 升级到 v4 会有什么不同吗?
4)如果我不能让它顺利工作,你能推荐另一个树形网格吗?我在我们的应用程序中使用 JQGrid 取得了巨大的成功,如果我必须找到另一个解决方案,那我会很伤心:(
干杯!
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
首先您应该从3.7.2版本升级到4.0.0版本。在 jqGrid 4.0 版本中,树形网格进行了更改以支持 gridview:true ,这在大量行/节点的情况下非常重要。
如果升级后性能仍然不够,您应该发布完整的网格定义并发布可以下载测试 JSON/XML 数据的 URL。然后人们可以调试问题并可能为您提供更多建议。
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.
尝试仅使用适用于该网格的链接和样式表。不必要的链接和样式表会影响性能,并可能导致冲突。这将增加文件加载时间并影响带宽。
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.