How can reduce the ionic 4 application load time?

General Tech Bugs & Fixes 2 years ago

1 2 0 0 0 tuteeHUB earn credit +10 pts

5 Star Rating 1 Rating

Posted on 31 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.

Take Quiz To Earn Credits!

Turn Your Knowledge into Earnings.

tuteehub_quiz

Answers (2)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 2 years ago

 

I want to improve my Ionic 4 application load time. It is taking time 6 seconds for app loading. my config.xml file is given below

   <preference name="SplashMaintainAspectRatio" value="true" />
    <preference name="FadeSplashScreenDuration" value="100" />
    <preference name="SplashShowOnlyFirstTime" value="false" />
    <preference name="SplashScreen" value="screen" />
    <preference name="SplashScreenDelay" value="500" />
    <preference name="AutoHideSplashScreen" value="false" />
    <preference name="ShowSplashScreen" value="true" />

these plugins that i am using into my application which is given below

  "cordova": {
    "plugins": {
      "cordova-wheel-selector-plugin": {},
      "cordova-plugin-whitelist": {},
      "cordova-plugin-statusbar": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-webview": {
        "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
      },
      "cordova-plugin-ionic-keyboard": {},
      "cordova-sqlite-storage": {},
      "cordova-plugin-x-toast": {},
      "uk.co.workingedge.cordova.plugin.sqliteporter": {},
      "cordova-plugin-advanced-http": {},
      "cordova-plugin-screen-orientation": {},
      "cordova-plugin-google-analytics": {
        "GMS_VERSION": "11.0.1"
      },
      "cordova-plugin-apprate": {},
      "cordova-fabric-plugin": {
        "FABRIC_API_KEY": "XXX",
        "FABRIC_API_SECRET": "XXX"
      },
      "cordova-plugin-local-notification": {},
      "cordova-plugin-background-mode": {}
    },
    "platforms": [
      "browser",
      "ios",
      "android"
    ]
  }

please help me to solve it

profilepic.png
manpreet 2 years ago

My advices for you is to

  • move any code you in your first page's constructor to ionViewDidLoad if it's possible ofc.
  • Build and run your app using the prod and release mode, you will notice the difference (by adding --prod and --release) 
    Note:the release build may not work for you, for android you need to install the app from the google play store.

  • Also try to optimise all the parts of your app, pictures, any media that you are using.

  • updating the plugins will enhance the performance as well (because there is always bugs fixing and code optimisations in the new versions).
    I believe if you applied all the above advices, the loading time will be decreased significantly as well as the app's performance.


1 views   0 shares

No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.