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(uses-text-compression): ignore percent threshold for large savings #16165

Merged
merged 3 commits into from
Aug 27, 2024

Conversation

connorjclark
Copy link
Collaborator

The 1400 bytes and 10% thresholds came from WPT. #1513 (comment)

The combination of these two served to exclude suggesting that already compressed resources (like image formats such as PNG) should be compressed, since they can just happen to maybe be a couple bytes smaller given extreme cases (like a small image data section and tons of metadata, which typically isn't compressed).

But using a percentage seems wrong to me, since saving 1MB from a 11MB resource (<10%) is something that seems obviously good to do.

So here I'm suggesting only considering the % threshold if the total savings is less than 20kb.

@connorjclark connorjclark requested a review from a team as a code owner August 23, 2024 20:54
@connorjclark connorjclark requested review from adamraine and removed request for a team August 23, 2024 20:54
@connorjclark connorjclark changed the title core(uses-text-compression): remove 10% savings threshold core(uses-text-compression): ignore percent threshold for large savings Aug 23, 2024
@connorjclark connorjclark merged commit 7e64d56 into main Aug 27, 2024
27 checks passed
@connorjclark connorjclark deleted the text-compress-rm-10pct branch August 27, 2024 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants