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): allow up to 10KB of unused CSS per file #9479

Merged
merged 1 commit into from
Jul 31, 2019

Conversation

patrickhulce
Copy link
Collaborator

Summary
Bumping the allowable limit to 10KB of unused CSS per file per discussion in #9353 (comment). Should have minimal impact on displayed results since the 8KB difference would be unlikely to significantly impact any metrics to appear in the first place.

Related Issues/PRs
closes #9353

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! seems reasonable

I'm curious where the 2048 came from. #4183 updated it from 1024 (with no mention of why...just aligning with unminified-css?). #1635 added the 1024 check, but no explanation there, either.

@@ -19,7 +19,9 @@ const UIStrings = {

const str_ = i18n.createMessageInstanceIdFn(__filename, UIStrings);

const IGNORE_THRESHOLD_IN_BYTES = 2048;
// Allow 10KB of unused CSS to permit `:hover` and other styles not used on a non-interactive load.
// @see https://github.com/GoogleChrome/lighthouse/issues/9353 for more discussion.
Copy link
Member

Choose a reason for hiding this comment

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

I wish we had a better link for this discussion (there's a lot of other stuff going on in that thread :)

@patrickhulce
Copy link
Collaborator Author

Yeah as with all these numbers I don't think there's ever been a hard and fast rule, and it's mostly been saying aloud "hey I'm gonna ignore stuff less than 2KB, sounds good?". If someone would like to come up with a grand unifying theory of "this exact number of byte savings is small enough to not flag to the user" that isn't the lantern simulation savings we already have, be my guest :)

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.

Bump Unused CSS Limit
3 participants