Loading too slow (Angular 4)

2

I put an application in Angular 4.3 in production and I realize that the first load is quite slow for the application size (2.93 mb)

The site does not connect to API Rest at the moment, it's just the visual part.

I took a look at the Chrome development tool and realized that the file that takes the most time to load is the vendor . I also noticed that it can not read fonts with .woff2 extension.

Does anyone have any idea what is causing this and how to solve it?

link: link

    
asked by anonymous 05.10.2017 / 03:20

2 answers

0

Good morning Duilio, how you are generating your production versions.

Are you using ng build --prod ??

If not the problem for being this.

If yes, how was your application built? Are you using the concept "lazy loading" ?? If not take a look at this link video.

I hope I have helped.

    
05.10.2017 / 13:48
0

The main problem was that it was loading modules unnecessarily, especially those coming from PrimeNg. Fixed imports and enabled Gzip compression on the server, improved considerably.

I'll add the Lazy Loading strategy as well and it should improve even more.

Thank you for your help!

    
06.10.2017 / 01:11