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

feat(components/perf/dynamicRendering): add content-visibility property #640

Merged
merged 2 commits into from
Nov 30, 2023

Conversation

nucliweb
Copy link
Member

@nucliweb nucliweb commented Nov 29, 2023

What?

Add the CSS property content-visibility to improve the performance.

Why?

We want to reduce the rendering time to improve the INP.

Reference

content-visibility: the new CSS property that boosts your rendering performance

Effects on Interaction to Next Paint (INP)

INP is a metric that evaluates a page's ability to be reliably responsive to user input. Responsiveness can be affected by any excessive amount of work that occurs on the main thread, including rendering work.

Whenever you can reduce rendering work on any given page, you're giving the main thread an opportunity to respond to user inputs more quickly. This includes rendering work, and using the content-visiblity CSS property where appropriate can reduce rendering work—especially during startup, when most rendering and layout work is done.

Reducing rendering work has a direct effect on INP. When users attempt to interact with a page that uses the content-visibility property properly to defer layout and rendering of offscreen elements, you're giving the main thread a chance to respond to critical user-visible work. This can improve your page's INP in some situations.

@nucliweb nucliweb merged commit 6b3f63b into master Nov 30, 2023
5 checks passed
@nucliweb nucliweb deleted the feat/content-visibility branch November 30, 2023 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants