0

I have developed an angular 6 application with --aot enabled and with lazy loading. This application on my local server is able to load in 2 sec. But when I load the same application on the AWS server, the loading time is more, and it is near to 40 sec.

Please let me know anyway is there to decrease the loading time of the application, while accessing it from the server?

Thanks to Akshay Rajut's answer, which helped me to increase the performance of my application.

Thanks in advance.

EDIT: I have taken build using the command: ng build --aot and using nginx for running the application.

Darshan theerth
  • 516
  • 1
  • 13
  • 34
  • What are you using to serve it? i think the problem is that your JS is not on CloudFront or and serve it via backend or something like that – Marat Mkhitaryan Aug 26 '19 at 07:02
  • there could be many things... adding a CDN would help, making it into a PWA would help too... your local load is probably fetching site assets from the local cache, which is why you get very fast response; you need to look at the network tab of the inspect elements – Akber Iqbal Aug 26 '19 at 07:34
  • I am using nginx. – Darshan theerth Aug 26 '19 at 09:12

0 Answers0