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

core(lantern): link layout nodes to root frame request #9727

Merged
merged 9 commits into from
Oct 30, 2019
Merged

Conversation

patrickhulce
Copy link
Collaborator

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

@@ -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');
Copy link
Collaborator

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

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;

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.

LGTM with a request for some comments :)

lighthouse-core/computed/page-dependency-graph.js Outdated Show resolved Hide resolved
lighthouse-core/computed/page-dependency-graph.js Outdated Show resolved Hide resolved
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.
Copy link
Member

Choose a reason for hiding this comment

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

can? :)

Copy link
Collaborator Author

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...

@vercel vercel bot temporarily deployed to staging October 28, 2019 23:14 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Open question: how to report iframe performance?
5 participants