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(unused-css): exclude header size for estimating wasted bytes #15671

Merged
merged 4 commits into from
Dec 12, 2023

Conversation

connorjclark
Copy link
Collaborator

following up to #15640, but doing it for unused-css.

@connorjclark connorjclark requested a review from a team as a code owner December 7, 2023 02:01
@connorjclark connorjclark requested review from adamraine and removed request for a team December 7, 2023 02:01
"LCP": 0
},
"details": {
"type": "opportunity",
"headings": [],
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

TODO: I want to debug this change.

"scoreDisplayMode": "metricSavings",
"numericValue": 0,
"numericUnit": "millisecond",
"displayValue": "",
"displayValue": "Potential savings of 14 KiB",
"metricSavings": {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

TODO: debug change.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it disappeared when I rebased

@@ -288,8 +288,7 @@ function getResponseReceivedEvent(networkRecord, index, normalizedTiming) {
connectionId: networkRecord.connectionId || 140,
fromDiskCache: networkRecord.fromDiskCache || false,
fromServiceWorker: networkRecord.fetchedViaServiceWorker || false,
encodedDataLength:
networkRecord.responseHeadersTransferSize || networkRecord.transferSize || 0,
encodedDataLength: networkRecord.responseHeadersTransferSize || 0,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

when responseHeadersTransferSize is not set the default should not be to make a record that treats all the bytes as being the size of the headers. thats what the old code was doing, and the test I modified revealed the error.

@devtools-bot devtools-bot merged commit f943f89 into main Dec 12, 2023
29 checks passed
@devtools-bot devtools-bot deleted the unused-css-transfer branch December 12, 2023 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants