I made a ionic cordova project but after publishing to android mobile phone. The duration of our program is around 10-20 sec with respec to the mobile phone types.
When I search this problem, people say that it is because of
- Splash Screen duration (Ionic splash screen not loading and Ionic2 performance issue)
- Path problem of any image
- 3rd Party libraries
- External CDN script libraries
- Lazy loading of pages
I try to solve regarding above problems e.g. i removed 3rd party libraries or CDN based scripts and check the all image paths etc..
I think Ionic is a wrong choice for mobile programming.
Is there any solution to decrease the opening duration of my mobile application ?
Thanks
Add these line to you main.prod.ts file.
and then build using this command
Ionic is the perfect solution for mobile app development.You need to use right
CLI
for that. Use below one:debug mode: This CLI supports AOT
release mode:
You can see this CLI list here
The all other answers are also necessary but I want to add another opinion.
If u use IONIC 3 you can try lazy loading and discard unnecessary 3rd party libraries like awesome or another...
This new feature from Ionic 3 not only makes our code more concise but also avoid the hassle of typing every damn time the same paths in every Class! Lazy Loading allows us to access Pages wherever we want by only using a string.
In old version, u need to use
In Ionic 3 u dont need to import these classes. U can use
ionic g page example
Then we see that a@IonicPage
decorator and a module with a same name in the directory.This pages or components could not be loaded while starting program.