-
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(byte-efficiency): replace pessimistic graph with optimistic #15651
Merged
Merged
Changes from 3 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
3b3f4fb
replace pessimistic graph with optimistic
adrianaixba 43011b0
Merge branch 'main' into optimistic-byte-efficiency
adrianaixba 9c24cf9
use min of pessimistic and optimistic
adrianaixba 7787944
rely on the optimistic graph instead of taking the min
adrianaixba 3c710b0
fix
adrianaixba 24b39a7
note
adrianaixba a9464c3
nit
adrianaixba 200d672
Merge branch 'main' into optimistic-byte-efficiency
adrianaixba File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4544,7 +4544,7 @@ | |
"displayValue": "Potential savings of 64 KiB", | ||
"metricSavings": { | ||
"FCP": 0, | ||
"LCP": 450 | ||
"LCP": 300 | ||
}, | ||
"details": { | ||
"type": "opportunity", | ||
|
@@ -4598,7 +4598,7 @@ | |
"type": "debugdata", | ||
"metricSavings": { | ||
"FCP": 0, | ||
"LCP": 450 | ||
"LCP": 300 | ||
} | ||
} | ||
}, | ||
|
@@ -4851,14 +4851,14 @@ | |
"id": "efficient-animated-content", | ||
"title": "Use video formats for animated content", | ||
"description": "Large GIFs are inefficient for delivering animated content. Consider using MPEG4/WebM videos for animations and PNG/WebP for static images instead of GIF to save network bytes. [Learn more about efficient video formats](https://developer.chrome.com/docs/lighthouse/performance/efficient-animated-content/)", | ||
"score": 0, | ||
"score": 0.5, | ||
"scoreDisplayMode": "metricSavings", | ||
"numericValue": 3450, | ||
"numericUnit": "millisecond", | ||
"displayValue": "Potential savings of 666 KiB", | ||
"metricSavings": { | ||
"FCP": 0, | ||
"LCP": 3300 | ||
"LCP": 0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a good change. Byte savings on the large gif are good, but it isn't the LCP resource so it's LCP impact is superficial. |
||
}, | ||
"details": { | ||
"type": "opportunity", | ||
|
@@ -4895,7 +4895,7 @@ | |
"type": "debugdata", | ||
"metricSavings": { | ||
"FCP": 0, | ||
"LCP": 3300 | ||
"LCP": 0 | ||
} | ||
} | ||
}, | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Thinking about this a little more. I think it was a mistake for our modus operandi to be "use the smallest estimate for savings possible". We should still use the optimistic graph because it is less noisy and focuses on the requests that definitely impacted LCP (at least in principle), but I don't think we need to add this arbitrary
Math.min
constraint just to get the lowest estimate. If a handful of edge cases have a higher savings estimate as a result that's fine with me but...As I said in my previous comment, I think we should explore an LCP optimistic graph that is modeled on the LCP critical path which should further reduce the noise in our LCP savings estimate here. As an initial thought, the optimistic graph could include just the LCP resource and any render blocking requests.