Conversation
✅ Deploy Preview for web-dev-staging ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
...ite/content/en/how-to-optimize-inp/avoid-large-complex-layouts-and-layout-thrashing/index.md
Outdated
Show resolved
Hide resolved
|
|
||
| When a user interacts with the page, those interactions should be as fast as possible. The amount of time it takes for an interaction to complete—ending when the browser presents the next frame to show the results of the interaction—is known as _interaction latency_. This is an aspect of page performance that the [Interaction to Next Paint](/inp/) metric measures. | ||
|
|
||
| The amount of time it takes for the browser to present the next frame in response to a user interaction is known as the interaction's _presentation delay_. The goal of an interaction is to provide visual feedback in order to signal to the user that something has occurred, and visual updates can involve some amount of layout work in order to achieve that goal. |
There was a problem hiding this comment.
| The amount of time it takes for the browser to present the next frame in response to a user interaction is known as the interaction's _presentation delay_. The goal of an interaction is to provide visual feedback in order to signal to the user that something has occurred, and visual updates can involve some amount of layout work in order to achieve that goal. | |
| The amount of time it takes for the browser to present the next frame after processing a user interaction is known as the interaction's _presentation delay_. The goal of an interaction is to provide visual feedback in order to signal to the user that something has occurred, and visual updates can involve some amount of layout work in order to achieve that goal. |
I initially read that as being the whole time so suggested a tweak to make it clearer.
|
|
||
| Layout is almost always scoped to the entire document. If you have a lot of elements, it's going to take a long time to figure out the locations and dimensions of them all. | ||
|
|
||
| If it's not possible to avoid layout then the key is to once again use Chrome DevTools to see how long it's taking, and determine if layout is the cause of a bottleneck. Firstly, open DevTools, go to the Timeline tab, hit record and interact with your site. When you stop recording you'll see a breakdown of how your site performed: |
There was a problem hiding this comment.
You haven't explained how it is possible to avoid layout. Do you mean making changes that don't affect "geometric properties"? E.g. ensuring elements are sufficiently sized to take any updates?
There was a problem hiding this comment.
A lot of this doc is left over from what Paul wrote, and what he wrote was a bit high-level. There's a ton of context we'll have to fill in after launch, I think.
…dev into inp-content-collection
| "optimize-long-tasks", | ||
| "optimize-inp", |
There was a problem hiding this comment.
Why remove these?
I think optimize-long-tasks is still good optimize JavaScript advice and there's no problems with this being in two collections.
Optimize INP should be moved to where the other Optimize guides are
...site/content/en/how-to-optimize-inp/client-side-rendering-of-html-and-interactivity/index.md
Show resolved
Hide resolved
...site/content/en/how-to-optimize-inp/client-side-rendering-of-html-and-interactivity/index.md
Show resolved
Hide resolved
...site/content/en/how-to-optimize-inp/client-side-rendering-of-html-and-interactivity/index.md
Outdated
Show resolved
Hide resolved
...site/content/en/how-to-optimize-inp/client-side-rendering-of-html-and-interactivity/index.md
Show resolved
Hide resolved
src/site/content/en/how-to-optimize-inp/dom-size-and-interactivity/index.md
Outdated
Show resolved
Hide resolved
src/site/content/en/how-to-optimize-inp/dom-size-and-interactivity/index.md
Outdated
Show resolved
Hide resolved
src/site/content/en/how-to-optimize-inp/dom-size-and-interactivity/index.md
Show resolved
Hide resolved
src/site/content/en/how-to-optimize-inp/dom-size-and-interactivity/index.md
Show resolved
Hide resolved
Co-authored-by: Barry Pollard <barrypollard@google.com>
src/site/content/en/blog/avoid-large-complex-layouts-and-layout-thrashing/index.md
Outdated
Show resolved
Hide resolved
src/site/content/en/blog/avoid-large-complex-layouts-and-layout-thrashing/index.md
Outdated
Show resolved
Hide resolved
…he fast content collection.
Co-authored-by: Barry Pollard <barrypollard@google.com>
tunetheweb
left a comment
There was a problem hiding this comment.
Think we're pretty much there so approving for you to merge when happy. Well done!
Co-authored-by: Rachel Andrew <rachelandrew@google.com>
…dev into inp-content-collection
Changes proposed in this pull request: