Question

After we upgraded from phoneGap to Cordova 2.2, the application runs notable slower. We are testing on iOS 5 and iOS 6 and at this point have no idea what could cause this slowdown. It did not occur on phoneGap.

We do have a very complex application and tons of plugins.

I was just wondering if anyone else has this issue and if there is a possible solution for it.

Thank you, Pascal

Was it helpful?

Solution

We ran into a similar problem when we switched from Cordova 2.1.0 on PhoneGap Build to using Cordova 2.2.0 with XCode and found a SIGNIFICANT performance decrease; our application was easily 1/5 to 1/10th the original speed in terms of responsiveness to UI operations.

We found that all plugins are enabled by default in XCode and were able to get performance back to the appropriate level by disabling unnecessary plugins, especially the Accelerometer. See http://iamcam.wordpress.com/2009/10/29/phonegap-up-to-speed/

Prior to disabling the plugins (the quick and easy solution), we spent considerable time cleaning up our code (the difficult but worthwhile solution). Specifically:

-Added 3D Transforms to items we knew we would manipulate (forces hardware acceleration; significant performance gain for some operations) and hardware-accelerated scrolling (-webkit-overflow-scrolling: touch;)

-Removed extraneous calls to get object position and offset (significant performance gain for some operations)

OTHER TIPS

After reading jmshearer's post & link, removing the accelerometer plugin was also the biggest performance improvement for us, but worth removing any unnecessary plugins from your Cordova.plist in XCode and recompiling.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top