Sencha Touch 2 android performance

后端 未结 1 758
Happy的楠姐
Happy的楠姐 2021-01-31 11:57

I am hearing that sencha in general, by the mere fact of using javascript, has performance issues on android devices.

I am familiar with limitations of the android webvi

1条回答
  •  逝去的感伤
    2021-01-31 12:24

    To my experience so far, there are some crucial points to keep in mind when developing Sencha Touch 2 applications with as best performance as possible:

    1. To optimize application startup time:

      • Compress your JS & CSS files. Remove any unused JS functions or CSS mixins (this can be easily done through SASS/Compass). For more details, please read this: http://www.sencha.com/blog/an-introduction-to-theming-sencha-touch
      • Load external JS files dynamically, there's already a good topic here: What is the proper way to load an external javascript in Sencha Touch 2
    2. To optimize application performance:

      • Keep your DOM structure as small as possible. Inactive views should be destroyed (and dynamically added to your Container later if needed).
      • Avoid using too many CSS3 properties since they are very slow on Android devices.
      • For any scrollviews, overscroll should be disabled on Android. I've tested many Sencha Touch 2 applications on Android devices and overscroll causes badly unpleasant experience because of delays and lags. (tested on Galaxy Tab, Nexus S, and some HTCs)

    There's also a topic here which is quite relevant to your concern:

    PhoneGap 1.4 wrapping Sencha Touch 2.X - What about performance?

    Hope it helps.

    edited on Feb, 12th 2014: It has been nearly 2 years since I posted this answer (i.e. more than 3 years I have been working with Sencha Touch) and I have to say that Sencha Touch performance on Android is sadly unacceptable. Sometimes I was stuck in the thought that I'm not fully mastering the best practices, but I think it's not the reason. Or at least, it will took us years to develop a large-scale Sencha Touch app which has equal "look and feel" as native apps because the tricks take us so much time.

    So in shorts, if you are targetting iOS or your app is very tiny, it's okay. But for big apps on Android, I personally don't go with Sencha Touch.

    0 讨论(0)
提交回复
热议问题