How to optimize the loading time of an Ionic2 project? [closed]

1

I made an application with Ionic2 from scratch, defaulting to the "blank" project following the documentation.

The project itself is running smoothly.

But one thing that intrigues me a little is the loading time at application startup.

While I'm showing a Splash Screen while charging the cord is done, it's taking 10 seconds on average (in some simulations it has reached 15 seconds) to finish charging.

After finishing loading I close SplashScreen on the triggered event:

platform.ready().then(() => {

  statusBar.styleDefault();
  splashScreen.hide();

});

My config.xml has a splash screen enabled, however if I take the splash, the application will be white screen (because it has not finished loading yet).

Config.xml

<preference name="webviewbounce" value="false" />
<preference name="UIWebViewBounce" value="false" />
<preference name="DisallowOverscroll" value="true" />
<preference name="android-minSdkVersion" value="16" />
<preference name="BackupWebStorage" value="none" />
<preference name="SplashMaintainAspectRatio" value="true" />
<preference name="SplashScreen" value="screen" />
<preference name="AutoHideSplashScreen" value="false" />
<preference name="SplashScreenDelay" value="3000" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="ShowSplashScreenSpinner" value="true" />
<feature name="StatusBar">
    <param name="ios-package" onload="true" value="CDVStatusBar" />
</feature>
<plugin name="ionic-plugin-keyboard" spec="~2.2.1" />
<plugin name="cordova-plugin-whitelist" spec="1.3.1" />
<plugin name="cordova-plugin-console" spec="1.0.5" />
<plugin name="cordova-plugin-statusbar" spec="2.2.1" />
<plugin name="cordova-plugin-device" spec="1.1.4" />
<plugin name="cordova-sqlite-storage" spec="~2.0.2" />

Charging time console

Ionic Native: deviceready event fired after 9833 ms 
Ionic Native: deviceready event fired after 10285 ms 

Based on this, I have the following questions:

  

Is there any way to shorten the loading time?   

Are there any settings / settings that allow the application to launch directly without this preload?   

If time is required, is there any way to start part of the application and let the load occur in the background?

    
asked by anonymous 12.05.2017 / 20:08

0 answers