-
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(lantern): link layout nodes to root frame request #9727
Conversation
@@ -10,8 +10,11 @@ const assert = require('assert'); | |||
|
|||
const trace = require('../../fixtures/traces/progressive-app-m60.json'); | |||
const devtoolsLog = require('../../fixtures/traces/progressive-app-m60.devtools.log.json'); | |||
const iframeTrace = require('../../fixtures/traces/iframe.trace.json'); |
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.
can you add the chrome version this was captured in to the filename? i rather like that
function addDependencyOnFrame(cpuNode, frameId) { | ||
if (!frameId) return; | ||
const networkNode = networkNodeOutput.frameIdToNodeMap.get(frameId); | ||
if (!networkNode || |
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.
break into two statements?
if (!networkNode) return;
if (... ) return;
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 with a request for some comments :)
urlToNodeMap.set(record.url, urlList); | ||
|
||
// If the request was for the root document of an iframe, save an entry in our | ||
// map so we can't link up the task `args.data.frame` dependencies later in graph creation. |
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.
can? :)
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.
lol this is not the first major typo I have made today either...
THIS IS A BREAKING CHANGE AND SHOULD NOT BE MERGED UNTIL 6.0
Summary
Fixes a bug in simulation where a large iframe's tasks are not linked to the main document request. In practice on our basket of sites this never makes a difference because script dominates anyhow, but it can make a substantial difference on reporting the perf of iframe-only pages (see #9719).
Related Issues/PRs
(probably) closes #9719