Reputation: 419
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
Upvotes: 2
Views: 3856
Reputation: 23273
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>
Upvotes: 3