-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
core(trace): compute trace for main frame and any child frames #11760
Conversation
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.
LGTM.
An optional refactor idea I leave to you (and @patrickhulce to weigh in) to decide on.
- modify
computeValidLCPAllFrames
to also return the lcp of each frame - call
computeValidLCPAllFrames
just once incomputeTraceOfTab
- either pass the main frame result to
computeKeyTimingsForFrame
; or circumvent that fn entirely and set the appropriate return values directly in the return statement ofcomputeTraceOfTab
I like explicitly computing the main frame LCP separately in I'll try to refractor this in the next PR for FCP since we would probably want a similar change for that event. |
Follow up to #11701 and #11713.
@paulirish recognized how loading two pages at once will lead to issues when calculating LCP for all frames #11701 (comment)
This PR makes some substantial changes to the trace processor which allows us to calculate the trace for the main frame and any child frames:
FrameCommittedInBrowser
events.frameTreeEvents
.largestContentfulPaint::*
events inframeTreeEvents
to calculate LCP from all frames. The previous behavior introduced in core(metrics): support LCP in all frames for devtools throttling #11701 looked forNavStartToLargestContentfulPaint::*::AllFrames::UKM
events in the entire trace.frameTreeEvents
instead of the entire trace to calculate CLS from all frames.FrameCommittedInBrowser
events. For future works, this trace can test FCP from all frames, this is so we won't need to update it again when that gets done.