-
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
core(critical-request-chains): prune requests without an initiator #11151
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
9f8c3d5
to
7dccf3b
Compare
177361a
to
bcbcc81
Compare
Yikes, so in between the time of fixing this one, @devtools-bot also auto-landed #11148 before This is actually a nice prompt to fix a long-standing bug in critical request chains we never ran into during our tests :) Before, when a script is added to the head via script and doesn't have an Now, we'll ignore any request in CRC that didn't have an initiator. Long-term I think we should refactor critical request chains to be based on the page-dependency-graph instead of manually computing using a set of heuristics to approximate the graph. This is a bigger change though, so the best course of action might be revert #11148, land this with just the 3p 1-liner fix and then reland #11148 with these CRC changes. |
bcbcc81
to
33bbc73
Compare
Oof, actually my suggested course of action would require turning back off |
@@ -116,7 +116,7 @@ describe('CriticalRequestChain gatherer: extractChain function', () => { | |||
} | |||
); | |||
|
|||
it('returns correct data for two parallel chains', () => { |
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.
these tests were mostly 3-4 years old when this audit was very different, no real-world trace I found had a situation where this was desirable today
@@ -168,11 +159,11 @@ describe('CriticalRequestChain gatherer: extractChain function', () => { | |||
}); | |||
}); | |||
|
|||
it('returns empty chain list when no critical request', () => { |
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 is an impossible case
@@ -182,26 +173,10 @@ describe('CriticalRequestChain gatherer: extractChain function', () => { | |||
assert.deepEqual(criticalChains, {}); | |||
}); | |||
|
|||
it('returns two single node chains for two independent requests', () => { |
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.
same case as the above (pruning non-root document)
@@ -222,27 +197,27 @@ describe('CriticalRequestChain gatherer: extractChain function', () => { | |||
}, | |||
}, | |||
}, | |||
}, | |||
}, | |||
4: { |
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.
just whitespace indentation to nest them under root
}, | ||
"75994.33": { | ||
"request": { | ||
"url": "http://localhost:10200/favicon.ico", |
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.
🎉
"transferSize": 221 | ||
"duration": 4796.288000012282, | ||
"length": 2, | ||
"transferSize": 30174 |
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.
huge win IMO that favicon.ico
at 221 is no longer flagged as the worst chain 🎉
just talked to @paulirish in 1:1 and he's still 👍 on this and it's sat for about a day for folks to object soooo I'm gonna merge in interest of green. if there are strong feelings about the CRC audit then happy to bring up in a future refactoring PR :) |
Fixes master CI unit tests
Summary
The slimmer third-party-web bundle in #11137 dropped the obscure entity we used for testing so I updated to one that won't disappear.
Hopefully we can reenable required checks again soon and get rid of CI that's always red to reserve the overall X signal 😅
UPDATE: after this PR was initially written, #11148 was autolanded before the required checks were turned back on which had critical request chain issues.