This blog is about tips
on using Sencha Touch.

Follow it via
RSS or Twitter.


Steffen Hiller is owner & lead developer of 360releases Ltd.,
a Sencha Touch, Ext JS & Ruby on Rails consultancy shop.

You can follow him on Twitter @steffenhiller.

#10 Performance Optimization

  • May 09, 2011

While developing Sencha Touch on the Desktop, everything is awesome and smooth, especially since you only have to care about WebKit.

As soon as you do actual testing on the devices, be it iOS, Android or Blackberry, the fun might literally get stuck for a second.

Luckily, there are multiple things you can do about optimizing the performance of your Sencha Touch applications.
Thanks to Xero's @storminwalker and Sencha's @jamespearce for pointing out a few very helpful resources. Since these resources are very important, I thought I make a short post mentioning them.

If you have any other helpful links or tips from your own experience, please let me and others know in the comments, thanks!

SenchaCon 2010 Video

First off, a very very insightful and helpful video from Sencha's @tmaintz that you probably should watch first:

SenchaCon 2010: Performance Optimization for Sencha Touch from Sencha on Vimeo.

Besides the video, here are an older blog post, that Tommy mentioned in the video, and a more recent one about memory usage:

Event Delegation

http://www.sencha.com/blog/event-delegation-in-sencha-touch/

Optimizing Memory Usage

http://www.sencha.com/blog/sencha-touch-optimizing-memory-usage/

General Performance tips from the PhoneGap wiki

http://wiki.phonegap.com/w/page/16494809/Performance-tips-for-device/

The point "Do not use animated gifs." makes me wonder what to use for loading spinners: Animated gifs or CSS3 animations?
The most common spinner that is also included in Sencha Touch runs actually fine on the iPhone, but a custom spinner I did the other day didn't run in sync on the iPhone and not at all on Android.

Custom CSS3 animation optimizations ideas

Regarding the "sync"-problem of my custom loading spinner, I received some interesting suggestions from Sencha's CEO Michael Mullany the other day. Maybe those may be of help for others, as well, therefore I add the link to the forum thread here:

http://www.sencha.com/forum/showthread.php?129697-CSS-animations-are-out-of-sync-on-iPhone

Again, please post in the comments any other helpful links or tips you might have, thanks!