I have integrated AOT compiler in my ionic project. App is still taking 6-7 seconds to appear first screen

Hey guys,
I followed below steps as you suggested:

  1. removed all platforms,plugins and pages from my project
  2. added android platform on blank project
  3. added page one by one(only installed individual plugin required by page at a time) and measure application startup time

Here is summary:
I have used pdfmake plugin for generate reports.
Before adding Report page, startup time was 1.5-2 seconds.
But after adding Report page(with pdfmake plugin), startup time increases to 6.5-7 seconds.

Also my Reports.ts contains very large code, so what i have done after adding Reports page is below:

  1. Commented large code, startup time => 4-5 seconds
  2. Uncomment large code, startup time => 6-7 seconds

Also i’m using below command for building production app:
ionic cordova run android --minifycss --minifyjs --optimizejs --aot --prod
(I’ve tried all possible optimization command here :smile:

So, i’m confused now that is it plugin or code that are causing much long startup time.

1 Like