Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Upgrade web-vitals to 3.3.1 and switch to attribution build #115
Upgrade web-vitals to 3.3.1 and switch to attribution build #115
Changes from 15 commits
a341315
530a228
9a7f95d
aba8d54
41db69f
2d94edc
55d87a2
87f4d3b
672d572
e8074a2
8287b4f
f08879c
f0194c7
6ff84fb
1fd9965
3b533e3
f93ba16
04939f7
a0ed05f
991ff04
0b7eb72
8ae60ae
b0976dc
7af7193
42c1862
2353ffa
94d1311
91ded44
7649895
7716a8e
21333b4
930250c
64fd4f0
130a173
c2f37e6
15fd43a
d6f3b74
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aside: any reason these INP sub-parts aren't a standard part of
web-vitals
attribution?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a good question!
Maybe @mmocny can confirm but maybe because it was less mature back then? Or because they are directly referenceable from the Entry itself it wasn't as important to add to the web-vitals build, as that differs slightly from LCP which needs the nav entry for TTFB and then the LCP resource time entry for the other parts so a bit more complicated.
Anyway, as you know Michael's been iterating on this recently so I imagine these sub-parts could change when he adds his "live breakdown" piece after this PR is merged. But still think this is a good first step and good to include for the reasons given above.
But do agree we should add whatever we finally land on to the web-vitals attribution build so other users can grab them easily - at which point we can reference them here too. It wouldn't really simplify the
performance.measure
(which needs both entries anyway) but could simplify the table code slightly (which only needs the duration).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We did want to add something to web-vitals attribution, but I decided to wait until we knew better exactly what we want to recommend measuring so as not to break compat eventually.
A long time ago we recommended just doing what we do here in the extension (split a single event into the three components: input-delay, processing-duration, presentation-delay)-- but as Barry says you can do that easily from a single entry.
In practice, processing-duration is better to SUM(all-events) in a single Animation Frame, rather than just looking at a single event. But when you do that, you end up having to re-define input-delay and presentation-delay to be "delay until first event" and "delay after last event".
Finally, presentation-delay can be split into "rendering-duration" (on main) and "presentation-delay" (off main).
All these things become easier (or possible, even) with Long Animation Frame (LoAF) reporting, and so that's where I've been iterating.
(The direction tooling is going is to "squash" multiple interactions in a single frame down to a single frame latency-- so we'll probably want to evolve this in the extension as well. I'll try a stab at updating INP user timings after updating INP logs.)