Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PhoneGap iOS app noticeably slow?

Tags:

cordova

I have lately been developing a very simple app for iOS with PhoneGap. All it does really is ask the user to input some coordinates and then drops a marker on a google map at the location of the coordinates. The app will do more later involving comparing those coordinates against a database of mineral sample findings, but even now it loads rather slower than I'd like.

It's not unusable-- it loads every page in about 2-2.5 seconds. But that's on wifi and it's just barebones HTML with a very minute amount of JavaScript, the minimum necessary to open a google map. I'm concerned it'll get worse once the database gets involved, and I'm concerned that this isn't good quality to begin with.

Is this an inherent issue with the phonegap framework, or are there ways to speed it up? I've been testing on an iPod touch from 2010, so the device isn't brand new but it certainly shouldn't be limiting us in terms of processing power.

like image 601
temporary_user_name Avatar asked Mar 29 '12 02:03

temporary_user_name


2 Answers

in my experience this is not common performance for a Phonegap app. Without seeing the code my guess would be that it's a combination of an older device (sadly JavaScript performance is not great on pre-2011 devices) and an outdated version if iOS. I recently tested an app on an iPhone 3G running 4.2 and it was unusable. JavaScript performance makes or breaks a Phonegap app and it's just not up to par on some devices.

Take a look at this page and you can figure out where your device sits on the JavaScript scale... http://www.bestsmartphone.com/2011/09/26/javascript-benchmarks/

Good luck!

like image 194
kevinstueber Avatar answered Sep 21 '22 19:09

kevinstueber


Try checking out fastclick to speed up touch responses. Also, to speed up page transitions use

        $(document).bind("mobileinit", function () {
                 $.mobile.defaultPageTransition = 'none';
        });
like image 30
quilkin Avatar answered Sep 23 '22 19:09

quilkin