S
S
sdgroup142018-12-24 13:53:11
Angular
sdgroup14, 2018-12-24 13:53:11

Is there any way to speed up Angular2+ ssr?

Hello. in general, I write in Angular 7. I attached Universal, all assemblies are configured and working. Of course, it was a grief for me to solve all conflicts when I did production under ssr ... there are quite a lot of plugins in the project .... googlemap, swiper, paperjs, textmask, perfectscroll, tweenmax ... well, in general, there are enough of them. When I started looking in networks for how much the production version is given to me, my indicator was domContentLoaded 1.7s Load 2.2s. I wondered what would happen if I removed all the pages altogether and left only the main page and swiper on it (there was paper.js + 2 canvases on this page before)...
domContentLoaded 1.5s Load 1.9s.
folder structure dist
dist
/browser
/server
server.js
File sizes have decreased significantly let's say dist/server/main.js was 900kb ? and after removing everything became 200kb. But this did not give any result, although I climbed into it, I saw (when it weighed 900kb) that everything is there, all that are in the project at all :). Here one more question arose, but is it possible, depending on the routing, to request a lib? then somehow it turns out that there are lazyModules and they are loaded depending on the route, but all the libraries themselves are loaded at once ...
Please tell me. What does this indicator depend on and how can I influence it. Of course, I took a clean build of Anular Universal Starter and the indicator became after the 2nd reboot domContentLoaded 0.4s

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question