denysonique
denysonique

Reputation: 16614

Is PhoneGap slow or it is a bug?

After I have compiled and deployed the demo application to my Samsung Galaxy S II I noticed that the Sample PhoneGap App which comes with PhoneGap was not very responsive when pressing buttons and scrolling.

I also made a little app using PhoneGap and jQuery Mobile, with 4 buttons everything was ok, but when I added more than 7 and my viewport needed to be scrolled, scrolling become to be very slow, the more buttons/widgets I had the slower the srolling was.

Is this a bug specific to my mobile device or it is just how PhoneGap works: The fact that PhoneGap apps feel slow on my phone including the demo?

EDIT:

The same PhoneGap app served by an HTTP server from my laptop and launched in the standard Android browser works very smoothly

Upvotes: 12

Views: 15018

Answers (4)

user363349
user363349

Reputation: 1318

For improved performance you may not need Phonegap.

If what you need is quick cross platform styling but fast native components try a tool like nativecss.com It keeps the styling in CSS, but uses native components for everything else - so no HTML rendering delays or clunky animations.

Upvotes: 0

Walter Fuchs
Walter Fuchs

Reputation: 175

I had the same Problems, after Update to Android 4.0.4 my Phonegap (Cordova 2.0.0) & Sencha Touch 2 - APP was very very slow.

But after I insert

super.appView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);

the APP works fine, as before the update.

http://developer.android.com/guide/topics/graphics/hardware-accel.html

Upvotes: 3

Matt Zukowski
Matt Zukowski

Reputation: 4541

Try setting your targetSdkVersion higher. Changing mine from "8" (i.e. Android 2.2) to "14" (Android 4.0) dramatically improved PhoneGap performance on phones running newer versions of Android. Most likely this enables certain performance-enhancing features such as hardware graphics acceleration.

For more info see my other answer about this here: https://stackoverflow.com/a/12397768/233370

Upvotes: 6

Serdar Dogruyol
Serdar Dogruyol

Reputation: 5157

Since PhoneGap and the frameworks that is used with it (JQM,Sencha Touch etc) are just working in a WebKit browser they can be slow if there's too much to render.

There's actually no bug with your device or etc.It's just that PhoneGap and the frameworks are not so good if you want fast response and so on.You can try your app in other devices and can observe that they behave the same.

Upvotes: 4

Related Questions