Oli*_*ins 6 javascript extjs extjs4 extjs5
我正在使用ExtJS Grid,它的速度非常慢,有3000多条记录.排序大约需要4秒钟.
我想也许在我的桌子上使用分页.但是在阅读完文档之后,我仍然不确定分页在extjs中是如何工作的.每次翻页时,这是否都会从服务器中提取数据?我宁愿不是这样的.我希望在浏览器中保存3000条记录,然后渲染的内容只是这些行的一部分.
我也使用Extjs版本4.2.1.如果我升级到版本5.我会获得一些性能改进吗?
尝试使用缓冲的渲染器插件,3000+记录并不是那么多,使用插件.
来自sencha doc的片段:
var grid = Ext.create('Ext.grid.Panel', {
// ...
autoLoad: true,
plugins: {
ptype: 'bufferedrenderer',
trailingBufferZone: 20, // Keep 20 rows rendered in the table behind scroll
leadingBufferZone: 50 // Keep 50 rows rendered in the table ahead of scroll
},
// ...
});
Run Code Online (Sandbox Code Playgroud)
您可以使用尾随/前导缓冲区配置来修剪网格,或者只是从配置中跳过它们.我从来不需要修剪自己
参考:http: //docs.sencha.com/extjs/4.2.2/#!/api/Ext.grid.plugin.BufferedRenderer