PDA

View Full Version : Help! Upgrade Extjs from 4.2.1 to 4.2.2 performance problem



qsoftvn
16 Jan 2014, 1:54 AM
Hi Extjs experts,

I am having trouble while upgrading our internal system (MVC) from Extjs 4.2.1 to 4.2.2 regarding performance in check tree panel. The purpose is that I want to loop through all the node in the tree, then where appropriate update the node's property using set method. Code runs well in Extjs 4.2.1 with around less than 1 second execution, however, in 4.2.2, performance drop down to 10 seconds. Kindly check the code in the controller as below:



init: function(){ this.control({ 'mypanel': { load: this.afterLoad, scope: this, }, }); }, afterLoad: function(store, node, records, successful, eOpts){ var tree = node.getOwnerTree(); node.eachChild(function(n){ this.updateCheck(tree, n); },this); }, updateCheck: function(tree, node){ if(node.hasChildNodes()==true){ node.eachChild(function(child){ this.updateCheck(tree, child); },this); } else{ this.updateValue(node); } }, updateValue: function(node){ node.set('abc',true); node.set('def',true); node.set('ghi',true); node.set('klm',true); },

When comment node.set(...), it runs as fast as version 4.2.1. I wonder if there is something I am wrong or node.set(...) is not optimized. Kindly help solving that.

Many thanks and regards,

Kien
QSoft Vietnam

scottmartin
16 Jan 2014, 5:06 AM
See the following thread example?
http://www.sencha.com/forum/showthread.php?274924

qsoftvn
16 Jan 2014, 6:16 AM
Much better and should be acceptable. Thanks for your help.