Sencha Touch 2 android性能 [英] Sencha Touch 2 android performance

查看:114
本文介绍了Sencha Touch 2 android性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我熟悉Android网页视图的限制,我一般听说sencha,只是使用javascript的事实,在Android设备上出现性能问题。对象,但我想知道这些性能声明是否有任何优点,特别是与Sencha Touch 2出来



虽然我没有一个较低端的Android设备,通过Sencha Touch 2图库,找不到免费的Android应用程序非常容易,所以也许您可以解释您的使用Sencha Touch 2在Android上的体验,以及您如何使其更快地实现

解决方案

根据我迄今为止的经验,在开发Sencha Touch 2应用程序时尽可能的提高性能有一些关键点:


  1. 要优化应用程序启动时间:




  2. 要优化应用程序性能:




    • 保持你的DOM结构尽可能的小。应该销毁非活动视图(如果需要,可以动态添加到您的容器中)。

    • 避免使用太多的CSS3属性,因为Android设备上的速度非常慢。 b
    • 对于任何滚动浏览,应该在Android上禁用过扫描。我在Android设备上测试了许多Sencha Touch 2应用程序,并且由于延迟和滞后而导致严重不愉快的体验。 (在Galaxy Tab,Nexus S和一些HTC上测试)


还有这里的一个主题与您的关注非常相关:



PhoneGap 1.4包装Sencha Touch 2.X - 性能如何?



希望它有帮助。



于2014年2月12日修改:自从我发布了这个答案已经近2年了即3年以上,我一直在使用Sencha Touch),而且我不得不说,Sencha Touch在Android上的表现令人难以接受。有时我被困在我没有完全掌握最佳做法的想法中,但我认为这不是原因。或者至少要花几年的时间才能开发出一款大规模的Sencha Touch应用程序,它具有相同的外观和感觉作为本地应用程序,因为这些技巧让我们花了很多时间。



所以简而言之,如果你的目标是iOS或你的应用程序很小,没关系。但是对于Android上的大型应用程序,我个人并不会使用Sencha Touch。


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 webview object, but I was wondering if these performance claims have any merit, especially with Sencha Touch 2 being out

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

解决方案

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:

  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.

这篇关于Sencha Touch 2 android性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆