0

I created an Angular app and i use Angular Universal for SSR. Following modern Angular deployment, i deployed the app using Firebase Hosting and Functions as described in this post (https://medium.com/@d.gerbede/angular-ssr-with-universal-and-firebase-e68e3989b8ff). It is discussible if this is the best approach but since i use the suite for firestore and functions for my api as well, it makes sense to me to keep it.

The functionality is as expected, but the loading times using firebase functions and hosting are very slow (7-15s) for the page document. Trying to reload often it is mostly about 9 seconds and sometimes (rarely) the lowest is 4 seconds.

Network tab screenshot

Looking at the firebase logs just confirms the long processing time: enter image description here (The logs due to selector errors should not be of concern. I also get them when running emulator and it seems to be a known problem with one of the libraries in relation with Universal.)

When i run my app in the emulator i get very fast results (ca. 200ms for document load). That fact makes me think, that the code itself and logic i use should not create the problems.

Originally i thought it had something to do with the region i selected for firebase functions and firestore - but i created a new project where i ensured the region is in Europe - that did not have any recognizable effect.

Can anyone please help me trying to investigate further in what the problem could be?

Thanks in advance to everyone! :)

FILO_q
  • 13
  • 3

0 Answers0