dspace-angular
dspace-angular copied to clipboard
Disable `inlineCriticalCss` by default for better SSR performance
References
- Follow-up to #2067 and #2934
Description
This PR changes the default setting of inlineCriticalCss to false (disabled) in order to improve the SSR (Server Side Rendering) performance.
For details about this change, see discussion in #2067, especially https://github.com/DSpace/dspace-angular/pull/2067#issuecomment-2015441135
Also see other references on web about poor performance of inlineCriticalCss:
- https://github.com/angular/universal/issues/2106
- https://medium.com/@e94kai/angular-12-server-side-rendering-optimization-2b8a30208c11
Instructions for Reviewers
- For detailed testing, I'm going to deploy this minor change immediately to https://sandbox.dspace.org . That will allow us to test this new default setting via Testathon and beyond.
Porting to dspace-7_x
If accepted, this should be ported to dspace-7_x. However, it will need to be a manual port because the inlineCriticalCss setting has changed in Angular 17 (see #2934 ). So this setting is slightly different on main and dspace-7_x branches.
Update: This has been deployed to https://sandbox.dspace.org via the dspace-8.0-testathon branch & can be tested there.
Backport failed for dspace-7_x, because it was unable to cherry-pick the commit(s).
Please cherry-pick the changes locally and resolve any conflicts.
git fetch origin dspace-7_x
git worktree add -d .worktree/backport-2944-to-dspace-7_x origin/dspace-7_x
cd .worktree/backport-2944-to-dspace-7_x
git switch --create backport-2944-to-dspace-7_x
git cherry-pick -x ee174747c2cce5b7fa55537f7bd9ec5ac6057126
Manually ported to 7.x in #3051