26 Oct 2011 12:48 AM #1
Component class change performance
I noticed that execution of addCls and removeCls on component is much slower on Sencha Touch 2.0 than 1.1. Everything would be ok, but on iPad 1st gen (and everything slower) it's affecting user experience (yes - there is a case where it's possible ).
It seems that you bind some 'events' on class change. So I'm wondering if this part of code is final and what was the reason of this change.
29 Oct 2011 6:55 PM #2
2 Nov 2011 10:32 AM #3Sencha Touch Lead Architect
3 Nov 2011 4:13 AM #4
Thank you guys for your answers.
In fact my problem was connected to unnecessary reflow, but I was distracted by small test I performed: I looped addCls and removeCls on the same component on Sencha Touch 1.1 and then 2.0 and used profiler to find out what was an execution time. It turns out that ST2.0 is slower, but is not an issue which can affect user experience (effect of slower add/removeCls is relatively small to repaint/reflow). So I was wrong. Refactoring my code helped, and it's very hard to find any difference from user point of view.
Thank you for your time, and sorry for false alarm.
3 Nov 2011 11:21 AM #5