Cordova启动应用程序非常缓慢 [英] Cordova start app very slow

查看:273
本文介绍了Cordova启动应用程序非常缓慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用cordova建立一个应用程式。应用程序本身是非常快。
但是应用程序的开始时间(从点击按钮到第一个屏幕显示的时间)它会超过8秒。



如何使它更快?我知道许多应用程序用cordova写,我不认为这需要8秒的应用程序。



我不需要任何功能的cordova只有互联网接入,并显示页面。没有相机没有权限..



感谢

解决方案


  1. >最小化所有源js和CSS文件。

  2. 对于较大的js和CSS,使用延迟加载。在这个负载尽可能少的资源在开始的应用程序。后来每当需要加载其他资源时。

再考虑一件事,创建一个单页的Web应用程序。在应用执行期间从一个页面切换到另一个页面会给用户带来不良体验。


I build an app with cordova. The app itself is very fast. But the start of the app(the time from the click on the button till the first screen shows ) it more then 8 sec.

How can I make it faster?? I know that many apps wrote with cordova and I dont think that it take 8 sec for those apps.

I dont need any feature of cordova only internet access and show the page. no camera no permissions..

Thanks

解决方案

Keeping all the sources locally also won't help you much.

You have two options

  1. Minimize all the source js and CSS files . This will work for smaller js and CSS files.
  2. For larger js and CSS use lazy loading. In this load as few resources as possible at start of app. Later whenever is required load other resources.

Consider one more thing, create a single page web application. Switching from one page to another during app execution gives a bad user experience.

这篇关于Cordova启动应用程序非常缓慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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