1

I have an Android Web apps using jquerymobile and phonegap.

I already compress js/html, place my scripts at the bottom of the page, and I am still not satisfied with the performance of my apps, especially when my script is doing DOM manipulation.

The response of the touch event is very slow (>2 sec or event more).

Tested with Android Browser/Android Firefox and the results are still the same.

When I compare the performance to the normal desktop browser / iPhone Safari / BlackBerry Browser / Nokia Browser my apps are responsive.

Specifications:

  1. Samsung Galaxy Tab II
  2. Android ICS 4.0
  3. phonegap 1.8.0
  4. jquerymobile 1.1.0

Recap of what I have already tried:

  • Get to deviceready faster.
  • Minimize / compress JS code using YUI Compressor
  • Move script tags to the bottom of the body tag.
4

1 回答 1

1

试试下面的。

添加:

webview.getSettings().setRenderPriority(RenderPriority.HIGH);
webview.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);

对于清单:

android:hardwareAccelerated="true"

此外,整理和缩小脚本(而不仅仅是缩小)并大量使用 .destroy() 来保持 DOM 修剪。

不幸的是,Android 上的 PhoneGap 速度非常慢。

于 2012-07-11T09:50:34.030 回答