Software Archive
Read-only legacy content

Slow apk

nicolas_r_
Beginner
855 Views

there is some way to make faster the start of the apk, when i emulate it works perfect all the screens load very fast also the maps no problem at all, but on real diverse it works  slowly, it load the splash screen fine but then on main page it takes some second to let me choose the options the apk just weight 7,56 MB mainly with photos and some maps on Frames, any advice i will appreciate a lot 

pd:I try the apk on sony xperia C3 and samsung galaxy s3

0 Kudos
6 Replies
PaulF_IntelCorp
Employee
855 Views

Since you are using maps I suspect you are pulling in some resources over the web. The size of your app is not the issue, the issue is where are you bringing in assets from (locally or over the web) and what sort of assets do you actually need to retrieve to start the app.

When you use the Emulate tab you are on a nice reliable fast connection to the Internet (the one your development system uses). When you are on a device you're using a slow and unreliable connection. You should not be loading resources over the Internet as part of your startup, if the device has not network connection (bad mobile coverage or no data connection) your app will not start at all. So you need to write your app so it starts without requiring a network connection. Then check for a useful connection before loading features like maps.

Definitely do not load JS and CSS and Fonts and images over the Internet that you could include locally with your app. For example, do not use a CDN to load things like jQuery or font files.

0 Kudos
nicolas_r_
Beginner
855 Views

ty a  lot for the info, there is some way like to pre load maps on cache or something like tath because i really need them to work better on my app. 

0 Kudos
PaulF_IntelCorp
Employee
855 Views

That's something I'd search the web for, not something we've investigated here. For example, search for something like "cordova phonegap cache map locally" or similar...

0 Kudos
nicolas_r_
Beginner
855 Views

well i add all to local files with js i have som iframe maps but they load on sub pages not in the main one the problem continues a little bit when i run the apk on real device it load the splash screen very fast and get into main page the problem is there it take like 15 sec to allowdme to take  any action.

adding more seconds to the splash screen may help?

0 Kudos
PaulF_IntelCorp
Employee
855 Views

Have you tried this experiment using the Debug tab or by configuring your app to "debuggable" so you can use remote CDT? Those will provide much higher-fidelity debugging scenarios than the Emulate tab. Please see these documents:

Also, please be sure you are building with Crosswalk, not Android.

0 Kudos
nicolas_r_
Beginner
855 Views

i solve the problem thanks for all the info =)

0 Kudos
Reply