Skip to content

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
Contributor

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


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
Contributor

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