减少从cordova离子中的冷启动的装载时间 [英] Decrease loading time from coldstart in cordova ionic

查看:325
本文介绍了减少从cordova离子中的冷启动的装载时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用ionic创建了cordova应用程序,当我从coldstart打开我的应用程序时,



它首先加载启动屏幕,然后有几秒钟,当屏幕是白色的,因为我的index.html文件加载,然后加载和显示应用程序UI。这在Moto X上需要大约10秒钟,因为我的应用程序包含速度是其本质的功能。



没有网络请求发生在



有没有任何优化技术可以减少加载时间,使应用程序的加载速度与其他混合应用程序(如gmail)一样快。

解决方案

有很多关于这个主题的信息,我会尽量列出一些可能感兴趣的。 关于Cordova启动时间




  • PhoneGap for Enterprise的作者Kerri Shotts给了这里有一个很好的答案一个类似的问题。虽然已经〜2岁了,提到的要点仍然适用。
    Kerri在这里碰到一个至关重要的问题:您无法完全控制载入时间,请记住这一点!

  • Christophe Coenraets已有一些幻灯片关于此主题的一些一般提示和具体示例。

  • (Microsoft对Cordova性能的提示可以在



=nofollow p> Ionic是建立在Angular的顶部,所以让我们来看看吧。
关于Angular启动时间





注意:此列表远不完整,可随意评论或添加内容。


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.

解决方案

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 on 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.

这篇关于减少从cordova离子中的冷启动的装载时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆