PhoneGap 1.4 wrapping Sencha Touch 2.X – What about performance?
This question, asked on stackoverflow.com, is really interesting and covers an important area in cross-platform mobile development: performance optimization
I’m building a multiplatform tablet app wrapping it with Phonegap 1.4 using just its webview, then I work my magic with the Sencha Touch 2 framework. By multiplatform I mean iOS 5.X+ and Android 3.0+ (for now).
This app is working great so far, all its features work on both systems but… On the Android tablet (Samsung GalaxyTab) its really slow. What’s happening? Can I do something about it, or its just android’s limit?
I’ve tested many of my Sencha Touch 2 applications on Samsung GalaxyTab and the performance is really terrible. There’s a fact (which maybe a part of actual reason) that, iOS does many pre-process and calculation before rendering to make it seems smoother to user’s look and feel, while Android tends to render & process simultaneously on the go.
PS: While it’s much relevant to the OS’s limit, you can also optimize your app to make it perform better on Android devices. To my experience, the best practice is:
Do NOT use CSS3 too much.
Keep your DOM as minimal as possible.
For more details, you can refer to this topic on stackoverflow.com: