Ionic 5 Cordova 9 Loads fast at first if I close and is in memory it loads slow

I have been using Ionic for my App from almost 1.5 years. It was working super fine, even when I did upgrade to Ionic 5.

Today I tried updating Cordova Android to 9 and then updated all my plugins.

I am finding a weird behavior now:

  • When I exit the app and I have not removed it from recent apps. It loads super slow on reopening. Approx. it’s taking 14secs.
  • When I exit the app and remove it from recent apps or force kill. It loads fast with no delay.

I’m not sure whether some plugin is causing the issue/something is wrong with cordova update. I’m not sure from where I should start debugging.

If anyone have any idea about how I can debug or how I can resolve this issue help me.

$ ionic info

> Ionic:
> 
>    Ionic CLI                     : 6.11.10 (C:\Users\nanda\AppData\Roaming\npm\node_modules\@ionic\cli)
>    Ionic Framework               : @ionic/angular 5.3.4
>    @angular-devkit/build-angular : 0.1001.4
>    @angular-devkit/schematics    : 10.1.4
>    @angular/cli                  : 10.1.4
>    @ionic/angular-toolkit        : 2.3.3
> 
> Cordova:
> 
>    Cordova CLI       : 10.0.0
>    Cordova Platforms : android 9.0.0
>    Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 
> 28 other plugins)
> 
> Utility:
> 
>    cordova-res : 0.15.1
>    native-run  : 1.0.0
> 
> System:
> 
>    NodeJS : v10.21.0 (C:\Program Files (x86)\nodejs\node.exe)
>    npm    : 6.14.4
>    OS     : Windows 10