简体   繁体   English

Android Webview上Angular2应用程序的加载时间

[英]Loading time of Angular2 application on Android Webview

I'm writing to enquire about loading time of my own angular2 application. 我正在写信询问我自己的angular2应用程序的加载时间。 Size of my app is not larger then 1,5MB (9MB with *.js.map files) and initial loading time on chrome browser is max 3-4 seconds. 我的应用程序大小不大于1,5MB(*。js.map文件为9MB),在chrome浏览器中的初始加载时间最多为3-4秒。 There is a problem with android webview. android webview有问题。 The same app loading time on android webview is about 10-14seconds. 相同的应用程序在android webview上的加载时间约为10-14秒。 I'm using standard webpack configuration. 我正在使用标准的webpack配置。 Angular2 Universal will help? Angular2 Universal会有所帮助吗? (server-side rendering) Maybe, anyone know reason and can explain me why loading time on webview is so long. (服务器端渲染)也许任何人都知道原因,并且可以向我解释为什么在Webview上加载时间如此之长。 Some tools, library which help me? 一些工具,库对我有帮助吗?

I am also developing a Angular 2 app which will load up in the Android Webview. 我也在开发一个Angular 2应用程序,该应用程序将在Android Webview中加载。 I faced the same slow loading problem. 我遇到了同样的缓慢加载问题。 Finally i found a solution 终于我找到了解决方案

I changed my project into Android CLI project then 然后我将项目更改为Android CLI项目

ng build --prod --aot

for building the project and it reduced my project size. 用于构建项目,它减少了我的项目规模。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM