ExtJS Ext.tree.Panel slow rendered on repeated store load

六眼飞鱼酱① 提交于 2019-12-12 02:57:48

问题


I have a tree panel, data provided by remote service and I update my tree data by node. On first node data load all rendered relatively fast, but if I reload node data child nodes rendered too slowly. This becomes critical with large amount of child elements (1000+).

I use ExtJS 4.2.0.663.

As I understand its a bug in ExtJS - related sencha forum thread.

Simple fiddle from linked forum thread to illustrate issue.

I'm trying to find a fix for my ExtJS version, but to no avail (at the moment I can not upgrade ExtJS).

Any ideas how can I solve this problem?

I guess I can try to compare code of related components in different versions and make changes to my ExtJS files, but it is a laborious task and perhaps some of you already know the solution to this problem.


回答1:


I'm pretty sure it's a problem with layout. as I get this solution must help you.

please try to call treeComponent.suspendLayouts() on beforexpand event and treeComponent.resumeLayouts(true) on afterexpand event.

if it does not helps try global suspend mechanism:

Ext.suspendLayouts();
...
Ext.resumeLayouts(true);



回答2:


It's a basic problem of the treepanel in Ext4. We using ExtJS on our company products and treepanels have extreme problems with large data coming as child nodes.

You can use the bufferedRenderer plugin on the treepanel to speed up the generation:

plugins: {
    ptype: 'bufferedrenderer'
}

Your updated fiddle: http://jsfiddle.net/qczvjrko/5/

Hope it helps.



来源:https://stackoverflow.com/questions/35747961/extjs-ext-tree-panel-slow-rendered-on-repeated-store-load

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!