Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

reducing memory footprint of phonegap, sencha touch on iOS (iPad)

I am using Sencha Touch 1.1 along with PhoneGap to deploy code on the iPad. In Instruments the memory usage shows up at around 140MB (virtual memory) and then does go up at some places to higher than 200 MB and my app gets killed at times due to large lists which I am fixing to reduce the DOM footprint. I tried testing out the sencha touch app from Safari and the memory did not grow to these limits, Safari on start was around 160MB and it went up to 200+ MB, but most times stayed in the 170-180MB range.

My next test was to figure out the impact of PhoneGap framework. The sample Hello world application when I install phonegap and try it out already seems to be using around 100 MB (virtual memory). I tried to search on the web to determine how this footprint can be reduced but did not find anything.

My question is the following - what can I do to reduce the phonegap footprint and is it even relevant to helping reduce crashes of my application? I see other applications like Flipboard which are native using a lot less memory (60-70 MB) and was trying to understand why the basic footprint of a phonegap app is 100+ MB while this phonegap + sencha-touch based app is hovering in the 150 - 200 MB range.

Anand

like image 451
Anand Avatar asked Nov 20 '25 18:11

Anand


1 Answers

You should look at removing the number of plugins your PhoneGap app loads. That is either controlled by an xml file (Android, BB) or by a plist (iOS). For instance if you are not using Contacts then don't load that Plugin, etc.

like image 198
Simon MacDonald Avatar answered Nov 25 '25 00:11

Simon MacDonald