-
Notifications
You must be signed in to change notification settings - Fork 302
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
Improve site performance metrics #3224
base: main
Are you sure you want to change the base?
Conversation
Implemented critical CSS extraction (critical CSS gets stripped from the bundled css and inserted directly into a style tag inside the head of html pages)... disappointing results. Shown top to bottom - current site (clickhouse.com), vercel preview with various changes (docusaurus faster, lazy loading code blocks, resource hinting etc), vercel preview with added critical css extraction: So essentially no benefit for added complexity, added build time to inject the CSS into all HTML elements + still need to spend more time on it as rendering looks bad with local development server ( Focusing on all other improvements made (excluding CSS extraction): Loss of points on performance due to total blocking time: I'm not sure how much control we really have over a lot of these. Reducing page sizes will help, but in the case of settings, functions etc it will take a big effort to restructure. Pages like this get flagged as good pages, and the only noticeable difference I can see is that the page is shorter. The size of the main.js bundle is directly tied to how many routes we have. This is a known issue with docusaurus, and something they will improve over time: facebook/docusaurus#7256 Performance improvement from around 40% to around 70% is already substantial + issues with FCP, LCP, CLS are fixed. I'd recommend we revert the CSS extraction changes and stop here for now, validate the fix on search console and see in 28 days if we need to further improve performance. Thoughts? |
988f68c
to
ff8807c
Compare
@Blargian my only concern is rendering issues. Painfully we probably need to sample a decent number of pages. Otherwise, if the improvements are significant merge and do further work under a new PR. |
Summary
Various improvements to pull up site vitals:
defer
andasync
where missing on tagsextract critical cssChecklist