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

Allow FMP trace event to appear slightly before the FCP #1404

Merged
merged 3 commits into from
Jan 5, 2017

Conversation

paulirish
Copy link
Member

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.

@googlebot
Copy link

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 cla/google commit status will not change from this state. It's up to you to confirm consent of the commit author(s) and merge this pull request when appropriate.

@paulirish
Copy link
Member Author

@googlebot cool thanks

@brendankenny
Copy link
Member

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)
Copy link
Member

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));
Copy link
Member

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?

Copy link
Member Author

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 @@
{
Copy link
Member

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 :)

}

// Sometimes fMP is triggered before fCP
// (this happends when above the fold is being swapped with JS)
Copy link
Member

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

@brendankenny brendankenny mentioned this pull request Jan 5, 2017
Copy link
Member

@brendankenny brendankenny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

M LGT

@brendankenny brendankenny merged commit a7648e7 into master Jan 5, 2017
@brendankenny brendankenny deleted the fmptolerance branch January 5, 2017 02:44
@tdresser
Copy link

tdresser commented Jan 5, 2017

Woah, FCP should never happen after FMP.
If that's happening, there's a bug.

@brendankenny
Copy link
Member

@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)

@wardpeet
Copy link
Collaborator

wardpeet commented Jan 7, 2017

@tdresser here is another one
whoistheorchid.com

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

5 participants