Ionic Initial Loading Time

淺唱寂寞╮ 提交于 2020-01-15 09:24:47

问题


I am building a simple app with Ionic. But my app has a performance issue with initial loading time on cold start.

Here is what I have done:

  1. collection-repeat instead of ng-repeat with 'track by'
  2. native scroll: overflow-scroll='true'
  3. use no cache with $ionicConfigProvider.views.maxCache(0);

I cannot use crosswalk-webview because of one of the library I am using.

I feel like all I have done is to improve ionic performance that is not really related with initial loading.

Any advice or suggestion would be appreciated.


回答1:


Without seeing your code, ionic and dependencies versions, and some output, it's hard to tell exactly. However, updating to the most recent version of Ionic Cloud and building with the production flag reduced my cold start load time from 20+ seconds to under 4 seconds.

npm install @ionic/cloud-angular@latest --save

ionic build --prod

It will take longer to build but you'll have a much faster cold start time.



来源:https://stackoverflow.com/questions/40120718/ionic-initial-loading-time

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!