performanceangular15angular-ssr

Server side angular app is very slow compared to non-ssr app


  1. My angular app has been converted into server side and currently rendering it via node server. The dist size has been doubled now (3 + 3 Mb) due to server & browser folders.

  2. Same app, I have built as a regular app (without SSR) and deployed on Apache server

  3. SSR App which is getting served via node server (https://billionlearners.com) is taking very long to load and render. Average FCP: 4000 (Displayed in console)

  4. Non-SSR App which is getting served via Apache server (https://sandbox.billionlearners.com) is taking less time to load and render. Average FCP: 400 (Displayed in console)

This can be confirmed via https://tools.pingdom.com/ as well.

Somehow I was under the impression SSR is faster, am I missing anything? Am I building/deploying in the wrong way?

Thanks in advance


Solution

  • Many different ways were tried, including Lazy Loading of modules, reducing main package size, zipping etc. It did improve the performance a bit but no substantial improvement was seen.

    Recently upgraded to Angular 16 and updated all config file accordingly including SSR related config files. Added client Hydration as well. Now performance has improved remarkably.

    So either some config was wrong Or upgrade to Angular 16 did the trick. But site (https://billionlearners.com) is super fast.