Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
716 views
in Technique[技术] by (71.8m points)

performance - Decrease loading time from coldstart in cordova ionic

I have created a cordova app using ionic, When i open my app from coldstart,

It first loads the splash screen, then there are a few seconds when the screen is white as my index.html file loads and then the app UI is loaded and displayed. This takes approximately 10 seconds on a Moto X which is too long since my app contains features in which speed is of the essence.

There is no network request that takes place during the loading from coldstart.

Is there any optimization techniques that can decrease the loading time to make the app load as fast as other hybrid apps like gmail.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

There is a lot of information about this topic, I'll try to list some that might be of interest. About Cordova startup time:

  • Kerri Shotts, the author of PhoneGap for Enterprise gave quite a good answer here on a similar question. Although it's already ~2 years old, the points mentioned still apply. Kerri is touching a vital issue here: You don't have 100% control over the load time, keep that in mind!
  • Christophe Coenraets has got some slides about this topic with some general tips and concrete examples.
  • (Microsoft's tips on Cordova performance can be found here. Sadly there's no info on startup times, so I'll put it in braces.)

Ionic is built on top of Angular, so let's also take a look at it. About Angular startup time:

  • I've got two links here: In the end, it boils down to measuring your performance and act on whatever causes your app to start slowly. See examples here and here.
  • Another thing to watch out for is ng-cloak. You didn't mention if you use it, but applying it to your whole body might be dangerous.

Note: This list is far from complete, feel free to comment or add stuff.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...