Further optimize initial page load by leveraging preboot #1733
Labels
bug
claimed: Atmire
Atmire team is working on this issue & will contribute back
e/20
Estimate in hours
high priority
performance / caching
Related to performance, caching or embedded objects
Describe the bug
In #1627 we've used a number of strategies to mitigate the problem that pages appear to load twice: they come back from the server fully rendered, but then are constructed again when the client JS code starts up
That works well for the home page, because we can predict what will be needed there and load it immediately, rather than lazily load it afterwards. However we can't do that everywhere without increasing the initial JS download further (and it is already rather large). So as a consequence on most pages other than the homepage you'll still see a flicker on the first page load, though #1627 made it much quicker and less noticeable
We can likely further improve upon this by using preboot, a library to smooth the transition from server-side rendered pages to client-side rendering, by doing things like replaying server side events on the client, buffering, ensuring the focus is retained when re-rendering, etc. (not to be confused with the
preboot
option in our current config, which basically just enables SSR)We've done a few initial tests, and the results look promising:
Without preboot
preboot-seach-before.mov
With preboot
preboot-search-after.mov
However simply adding and enabling it as we've done here creates a few other problems, such as unexpected page reloads when using the header search field for example. It also looks like we'll need at least some of the workarounds for angular/preboot#75
We'd like to see if we can work out the kinks and create a PR. We'll take a max of 20h
Related work
#1627
The text was updated successfully, but these errors were encountered: