Skip to content

core(uses-text-compression): ignore percent threshold for large savings#16165

Merged
connorjclark merged 3 commits intomainfrom
text-compress-rm-10pct
Aug 27, 2024
Merged

core(uses-text-compression): ignore percent threshold for large savings#16165
connorjclark merged 3 commits intomainfrom
text-compress-rm-10pct

Conversation

@connorjclark
Copy link
Copy Markdown
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 force-pushed the text-compress-rm-10pct branch from 9953f4d to 523576d Compare August 23, 2024 20:55
@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
@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