We are developing an Android application using phonegap 1.1.0 and jquery 1.0rc1 minified file. The performance is very slow in the android device.DOM loading takes time to load.How do we optimize the dom loading in Android
Asked
Active
Viewed 3,853 times
2
-
1Have you tried doing the same call from a desktop browser? Notice any difference in performance? – Tobbe Nov 21 '11 at 07:49
-
i think u need to phrase it correctly. when u mentioned performance is very slow, u meant the webservice call or the interactivity eg. swiping or touching a button? i did worked on phonegap and jquery mobile and the interactivity is pretty slow when installed on a motorola milestone. it also depends on ur hardware and os rendering esp. phonegap is webview based. – Jianhong Nov 21 '11 at 08:25
1 Answers
3
Yeah, Android's web view is not exactly optimized for some of the fancy things that jQuery does. My advice is to try the latest version of jQuery as they just released version 1.0. As well you can try disabling some of the effects to get some performance benefits.
<script type="text/javascript">
$(document).bind("mobileinit", function() {
$.mobile.autoInitializePage = false;
$.mobile.defaultPageTransition = 'none';
$.mobile.touchOverflowEnabled = false;
$.mobile.defaultDialogTransition = 'none';
$.mobile.loadingMessage = 'Daten werden geladen...' ;
});
</script>

Simon MacDonald
- 23,253
- 5
- 58
- 74
-
Thanks simon your suggestion has improved the performance.I have a doubt that jquery application in iphone perform much faster than android.Is this due to OS problem? – srividya Nov 22 '11 at 07:11
-
1
-