title: Long initial loading time to load?
body: <p>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. </p>
  
  <p>We are now stuck at the loading time of the application which takes 2 minutes to load. </p>
  
  <p>Here is the issue,</p>
  
  <p>In version 3 </p>
  
  <ul>
  <li><p>There are 23 page in ClassHours. We have separated all of them to <code>@NgModule</code>.</p></li>
  <li><p>Earlier all the component and pages were included in <strong>app.module.ts</strong>.  Now only myapp page, the browser module, and HTTP module are included.</p></li>
  </ul>
  
  <p>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). </p>
  
  <p>Here is the link for our testing site 54.254.254.112. Please check the issue here and make it a mobile view. </p>
  
  <p>( Credentials for our testing account 
  mobile number - 0000000000
  password - 000000 )</p>
  
  <p>Here is the deployment process we are using -</p>
  
  <pre><code>ionic build browser
  </code></pre>
  
  <p>copy <code>/www</code> from <code>/platforms/browser</code> to <strong>ec2 amazon instance</strong>
  and run <strong>nginx</strong> pointing <strong>index.html</strong> of <code>/www</code></p>
  
  <p>Service worker is also enabled, which helps us improve the second load time.</p>
  
  <p>Guide us with -</p>
  
  <ol>
  <li>How can we reduce the size of mainjs from 4mb?</li>
  </ol>
  
  <p>or</p>
  
  <ol start="2">
  <li>Is there some issue with deployment process?</li>
  </ol>
  
  <p>How can we reduce the first time load time?</p>
  
  <p>We need your guidance to run toward a neat and fast user experience.</p>
  
  <p>Shall wait for a positive response.</p>
  
  <p>Time taken by main.js:<br>
  <a href="https://i.stack.imgur.com/X14Du.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/X14Du.jpg" alt="Time taken by main.js"></a></p>