PhoneGap的 - 坏的性能相比,浏览器在Android浏览器、性能、PhoneGap、Android

2023-09-04 13:33:45 作者:感谢

我公司开发的针对Android的应用程序使用jQuery Mobile和PhoneGap的。 我部署的应用程序,以我的设备通过USB。该应用程序IST的表现非常糟糕,尤其是在滚动较长的列表。

I developed an application for android using jquery mobile and phonegap. I deployed the app to my device over usb. The performance of the app ist really bad, especially while scrolling a longer list.

但奇怪的是:整个应用程序运行平稳,如果我只是打开了我的手机浏览器,直接访问的index.html。同样的技术,相同的内容。我不使用PhoneGap的本机API或类似的话。

The strange thing is: The whole app runs smooth if i just open up the browser on my phone and access the index.html directly. Same technology, same content. I do not use the phonegap native api or anything similar.

测试与PhoneGap的1.5.0和1.7.0rc1,jQuery Mobile的1.1.0 Android上4.0.2。

Tested with phonegap 1.5.0 and 1.7.0rc1, jquery mobile 1.1.0 on android 4.0.2.

任何想法?

推荐答案

在蜂窝(3.0),冰淇淋(4.0)和后部装置,您可以通过添加以下提高性能的<应用...>标签:

On honeycomb (3.0), Ice cream (4.0) and posterior devices, you can boost performance by adding the following in the < Application ... > tag:

android:hardwareAccelerated="true"

您可以设置minSdk 8(Android 2.2的)的兼容性和targetSdk 15(安卓4.0),这将使得硬件加速工作的时候它的设备上可用的唯一。

You could set the minSdk to 8 (Android 2.2) for compatibility and the targetSdk to 15 (Android 4.0) and that would make hardware acceleration work when its available on the device only.

我相信,有了这个标志我的应用程序的性能等于在浏览器中运行它们,所以我想它,因为浏览器是codeD带硬件加速:)

I believe that with this flag the performance of my apps is equal to running them in the browser, so I guess its because the browser was coded with hardware acceleration :)