srividya
srividya

Reputation: 419

android performance jquery phonegap issue

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

Answers (1)

Simon MacDonald
Simon MacDonald

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

Related Questions