标签:ext4 store
ext4.2
需求:
清空store1的数据,并把store2的数据加载到store1中。速度太慢,需要优化。原始代码:
var start1 = new Date().getTime(); anlyGridStore.removeAll(); var start2 = new Date().getTime(); console.log(start2-start1); //614 analyses.each(function (record) { data.push(record); }); var start3 = new Date().getTime(); console.log(start3 - start2); //3 anlyGridStore.insert(0, data); var start4 = new Date().getTime(); console.log(start4 - start3); //183
改进代码:
var start1 = new Date().getTime(); anlyGridStore.loadData(analyses.data.items, false); // 227 var start4 = new Date().getTime(); console.log(start4 - start1);
本文出自 “技术人生” 博客,请务必保留此出处http://wangyuelucky.blog.51cto.com/1011508/1409855
ext store remove old datas load new datas优化,布布扣,bubuko.com
ext store remove old datas load new datas优化
标签:ext4 store
原文地址:http://wangyuelucky.blog.51cto.com/1011508/1409855