user1516340
user1516340

Reputation: 11

Android+jquerymobile+phonegap poor performance compared with iphone / blackberry / nokia

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:

Upvotes: 1

Views: 1118

Answers (1)

darryn.ten
darryn.ten

Reputation: 6973

Try the following.

Add:

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

And to the manifest:

android:hardwareAccelerated="true"

Also, collate and minify the scripts (instead of just minifying) and use .destroy() a lot to keep your DOM trim.

PhoneGap on Android is notoriously slow unfortunately.

Upvotes: 1

Related Questions