Intial Loading Time of Application

Team Ionic,
Greetings,

We are a startup from India. To be precise a group of passionate people working hard to change the education system. The system is huge and we start off by first picking the communication gap between parent, teachers, and students. We do it through a PWA named ClassHours. Well, it consists of abundant functionalities.

We looked out the best platform out in the market, we selected ionic for the start. With all the trust, we kept on shifting and updating our application from VERSION 1, VERSION 2 and now VERSION 3 on ionic with your progress.

We are now stuck at the loading time of the application which takes 2 minutes to load.

Here is the issue,

In version 3

  • There are 23 page in ClassHours. We have separated all of them to @NgModule.

  • Earlier all the component and pages were included in app.module.ts. Now only myapp page, the browser module, and HTTP module are included.

Still, the size of the mainjs is 4mb which makes the build heavy. It takes 2 minutes load for any user to load the application.(Refer image).

Here is the link for our testing site 54.254.254.112. Please check the issue here and make it a mobile view.

( Credentials for our testing account
mobile number - 0000000000
password - 000000 )

Here is the deployment process we are using -

ionic build browser
copy /www from /platforms/browser to ec2 amazon instance
and run nginx pointing index.html of /www

Service worker is also enabled, which helps us improve the second load time.

Guide us with -

  1. How can we reduce the size of mainjs from 4mb?
    or
  2. Is there some issue with deployment process?

How can we reduce the first time load time?

We need your guidance to run toward a neat and fast user experience.

Shall wait for a positive response.
Thanks.

regards,
Team ClassHours

Got the solution. Use npm run build --prod browser

1 Like

So, let us know how did this improve your problems?

The loading time significantly went down. From 17 sec to 6 sec. Got the help from Slack! Thanks

Can you please share what changes you have made to reduce initial loading time of application?