Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Further optimize initial page load by leveraging preboot #1733

Open
artlowel opened this issue Jul 20, 2022 · 1 comment · May be fixed by #1760
Open

Further optimize initial page load by leveraging preboot #1733

artlowel opened this issue Jul 20, 2022 · 1 comment · May be fixed by #1760
Assignees
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

Comments

@artlowel
Copy link
Member

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

@artlowel artlowel added bug needs triage New issue needs triage and/or scheduling labels Jul 20, 2022
@tdonohue
Copy link
Member

@artlowel : This seems worth looking into. I would caution though that I'd be good to ensure it doesn't take up too much time for 7.4... I feel the fixes in 7.3 are significant (over 7.2 and prior). This seems like another good fix, but I don't want it to take away significantly from fixing other high priority issues on our board.

So, I'm fine with spending 20hrs on this. But, if it becomes more than that, I'd recommend we consider pushing this to 7.5. In any case, for now I'll assign to you with the 20hr max on it, and move it to 7.4 board

@tdonohue tdonohue added high priority performance / caching Related to performance, caching or embedded objects e/20 Estimate in hours and removed needs triage New issue needs triage and/or scheduling labels Jul 20, 2022
@tdonohue tdonohue moved this to To Do in DSpace 7.5 release Oct 11, 2022
@tdonohue tdonohue moved this from To Do to In Progress in DSpace 7.5 release Oct 21, 2022
@tdonohue tdonohue moved this to 🏗 In Progress in DSpace 7.6 Release Feb 17, 2023
@tdonohue tdonohue moved this from 📋 To Do to 🏗 In Progress in DSpace 8.0 Release Jun 28, 2023
@tdonohue tdonohue moved this to 🏗 In Progress in DSpace 9.0 Release Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
Status: 🏗 In Progress
Development

Successfully merging a pull request may close this issue.

2 participants