Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google insight is showing very low performance in angular application

I am running an angular application which is showing very low score in google page insights (13 in mobile and 43 in desktop). I am running this on Nginx server and all the compression and caching issues are solved from Nginx side but still it shows very low score in page insight. There is only one image in the page and it is already compressed.

Erros are to remove unused javascript and css files. But the files they are showing error are the build files which are generated from the angular production build. I am not getting how that files are unused. I am attaching the screenshot of errors here. Please help me solving these issues.enter image description here enter image description here enter image description here

like image 307
Vivek Avatar asked Aug 22 '20 09:08

Vivek


1 Answers

The issue is Zone.js - Zone.js is slowing down the application on google page speed, I have the same problem (for years). You can try too by disabling the zone.js on polyfills, and then add the zone.js file on assets and load as a script tag on the index.html and you will see the issue, and then disable the zone.js tag and run the lighthouse.

Test google page speed:

  1. normal zone.js in polyfills.
  2. Zone.js in assets with script tag on the index.html (on the head) - make sure to disable on polyfills
  3. Disable zone.js on disable on polyfills and or index.html
like image 150
jcdsr Avatar answered Sep 16 '22 12:09

jcdsr