-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Allow FMP trace event to appear slightly before the FCP #1404
Conversation
So there's good news and bad news. 👍 The good news is that everyone that needs to sign a CLA (the pull request submitter and all commit authors) have done so. Everything is all good there. 😕 The bad news is that it appears that one or more commits were authored by someone other than the pull request submitter. We need to confirm that they're okay with their commits being contributed to this project. Please have them confirm that here in the pull request. Note to project maintainer: This is a terminal state, meaning the |
@googlebot cool thanks |
you have some camel case eslint errors |
e.name === 'firstMeaningfulPaint' && e.ts >= (firstFCP.ts - fCPfMP_TOLERANCE)); | ||
|
||
// Sometimes fMP is triggered before fCP | ||
// (this happends when above the fold is being swapped with JS) |
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.
happens
(also not sure what this means. Fold?)
const firstMeaningfulPaint = frameEvents.find(e => | ||
e.name === 'firstMeaningfulPaint' && e.ts >= firstFCP.ts); | ||
e.name === 'firstMeaningfulPaint' && e.ts >= (firstFCP.ts - fCPfMP_TOLERANCE)); |
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.
if there's an FMP event a few ms before FCP (within tolerance) and one after FCP, is the first one always better here?
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.
this shouldn't happen as we filter by frame. but if so, yeah sure. :)
@@ -0,0 +1,77 @@ | |||
{ |
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.
hooray for minimal trace fixtures :)
63b0b8e
to
073b820
Compare
} | ||
|
||
// Sometimes fMP is triggered before fCP | ||
// (this happends when above the fold is being swapped with JS) |
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.
rebase or something got mixed up here
073b820
to
3dac393
Compare
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.
M LGT
Woah, FCP should never happen after FMP. |
@tdresser there's an example trace with FMP before FCP in www.nfl.com_2017-01-04_09-44-25-0.zip from #1253 (comment) |
@tdresser here is another one |
This is the core problem of #1253.
As @wardpeet deduced, we are hitting these because sometimes FMP trace events are added before FCP
This now allows there to be 32ms of tolerance between the two, as we found traces where FMP is just 0.7ms before FCP.
Fixes #1253.