PDA

View Full Version : Iteration performance in IE



juger
19 Feb 2013, 1:57 PM
On the 4.1 blog addressing performance, it recommends using for instead of Ext.Array.each. I'm working with a lot of code that uses Array.each and I'm trying to figure out if changing all of them to 'for' is worth the time. The performance under IE poor for my application, so I need to do something, I'm just wondering whether Array.each would have that great an impact.

scottmartin
19 Feb 2013, 2:04 PM
Depends on the usage .. I cannot hurt, but it may not provide the boost you are wanting.

What version of IE are you testing on?

Scott.

juger
19 Feb 2013, 2:06 PM
IE 9. The application is quick and responsive on chrome, but on IE, the loading indicators get stuck and a warning comes up about long running scripts. It eventually works fine, but it takes a while to get there. Too bad javascript doesn't support multithreading.

scottmartin
19 Feb 2013, 2:19 PM
You can try and see if suspendLayouts/resumeLayouts will help. If you are accessing the store a lot, you can look at suspendEvents/resumeEvents as well.

Scott.

juger
19 Feb 2013, 2:21 PM
The suspendEvents/resumeEvents looks like it could help. I ran a profiler and it was spending a lot of time on a specific queryBy I was doing. I'll rewrite that portion and use suspend/resume events and see if that helps. thanks.