简体   繁体   English

Sencha Touch 2安卓性能

[英]Sencha Touch 2 android performance

I am hearing that sencha in general, by the mere fact of using javascript, has performance issues on android devices. 我听说,仅仅通过使用javascript这一事实,sencha在Android设备上存在性能问题。

I am familiar with limitations of the android webview object, but I was wondering if these performance claims have any merit, especially with Sencha Touch 2 being out 我熟悉android webview对象的局限性,但我想知道这些性能声明是否有任何优点,尤其是Sencha Touch 2出局

Although I don't have a lower end android device, I was looking through the Sencha Touch 2 gallery and could not find free android apps very easily, so perhaps you can explain your experience with Sencha Touch 2 on Android and what you did to make it faster 虽然我没有低端Android设备,但我正在浏览Sencha Touch 2画廊并且无法轻松找到免费的Android应用程序,所以也许你可以用Android上的Sencha Touch 2解释你的体验以及你做了什么它更快

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: 根据我迄今为止的经验,在开发具有尽可能最佳性能的Sencha Touch 2应用程序时,需要牢记一些关键点:

  1. To optimize application startup time: 优化应用程序启动时间:

  2. To optimize application performance: 要优化应用程序性能:

    • Keep your DOM structure as small as possible. 保持您的DOM结构尽可能小。 Inactive views should be destroyed (and dynamically added to your Container later if needed). 应销毁非活动视图(如果需要,稍后将动态添加到您的Container中)。
    • Avoid using too many CSS3 properties since they are very slow on Android devices. 避免使用过多的CSS3属性,因为它们在Android设备上非常慢。
    • For any scrollviews, overscroll should be disabled on Android. 对于任何滚动视图,应在Android上禁用过度滚动。 I've tested many Sencha Touch 2 applications on Android devices and overscroll causes badly unpleasant experience because of delays and lags. 我已经在Android设备上测试了许多Sencha Touch 2应用程序,并且由于延迟和滞后而导致过度滚动导致非常不愉快的体验。 (tested on Galaxy Tab, Nexus S, and some HTCs) (在Galaxy Tab,Nexus S和一些HTC上测试过)

There's also a topic here which is quite relevant to your concern: 这里还有一个与您的关注密切相关的话题:

PhoneGap 1.4 wrapping Sencha Touch 2.X - What about performance? PhoneGap 1.4包装Sencha Touch 2.X - 性能怎么样?

Hope it helps. 希望能帮助到你。

edited on Feb, 12th 2014 : It has been nearly 2 years since I posted this answer (ie 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. 2014年2月12日编辑 :自从我发布这个答案已经将近2年(即我与Sencha Touch合作超过3年),我不得不说Android上的Sencha Touch表现令人遗憾地无法接受。 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. 或者至少,我们需要花费数年时间来开发一个大型的Sencha Touch应用程序,它具有与原生应用程序相同的“外观和感觉”,因为这些技巧花费了我们很多时间。

So in shorts, if you are targetting iOS or your app is very tiny, it's okay. 所以简而言之,如果你的目标是iOS,或者你的应用程序非常小,那就没关系。 But for big apps on Android, I personally don't go with Sencha Touch. 但对于Android上的大型应用程序,我个人不会使用Sencha Touch。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM