-1

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

user3513759
  • 67
  • 10

1 Answers1

0

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.

Badro Niaimi
  • 959
  • 1
  • 14
  • 28