Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Build: Report Brotli sizes in compareSize #5586

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

Merged
merged 1 commit into from
Nov 25, 2024
Merged

Conversation

mgol
Copy link
Member

@mgol mgol commented Nov 21, 2024

Summary

So far, we were mostly optimizing gzipped sizes. However, using Brotli is more and more popular as all modern browsers support it and compression is much better. It makes sense to also pay attention to these numbers.

The comparseSize version stays at 2 as this only introduces a new field without affecting existing ones. The only drawback is comparisons with branches that didnt have Brotli computed before will return NaN. This can be easily fixed locally by checking out the branch and running the build, but at least we don't lose gzipped sizes in the meantime.

Checklist

So far, we were mostly optimizing gzipped sizes. However, using Brotli is more
and more popular as all modern browsers support it and compression is much
better. It makes sense to also pay attention to these numbers.

The `comparseSize` version stays at `2` as this only introduces a new field
without affecting existing ones. The only drawback is comparisons with branches
that didnt have Brotli computed before will return `NaN`. This can be easily
fixed locally by checking out the branch and running the build, but at least
we don't lose gzipped sizes in the meantime.
@mgol mgol requested a review from timmywil November 21, 2024 10:31
@mgol mgol self-assigned this Nov 21, 2024
@mgol
Copy link
Member Author

mgol commented Nov 21, 2024

Example local output:

Sizes
   raw     gz     br Filename
 78807  27642  24994 dist/jquery.min.js
 56086  19533  17745 dist/jquery.slim.min.js
 78713  27620  24962 dist-module/jquery.module.min.js
 55992  19512  17691 dist-module/jquery.slim.module.min.js

main @d5ebb464debab6ac39fe065e93c8a7ae1de8547e
   raw     gz     br Filename
   -42    -16    NaN dist/jquery.min.js
   -42    -20    NaN dist/jquery.slim.min.js
   -42    -16    NaN dist-module/jquery.module.min.js
   -42    -20    NaN dist-module/jquery.slim.module.min.js

drop-finalPropName-cache @xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
   raw     gz     br Filename
    -5     +1    +11 dist/jquery.min.js
    -5     +1    +13 dist/jquery.slim.min.js
    -5     +2    -60 dist-module/jquery.module.min.js
    -5     +1     -3 dist-module/jquery.slim.module.min.js

@mgol mgol added the Discuss in Meeting Reserved for Issues and PRs that anyone would like to discuss in the weekly meeting. label Nov 21, 2024
@timmywil timmywil removed Needs review Discuss in Meeting Reserved for Issues and PRs that anyone would like to discuss in the weekly meeting. labels Nov 25, 2024
@mgol mgol merged commit e4b5e62 into jquery:main Nov 25, 2024
17 checks passed
@mgol mgol deleted the compareSize-brotli branch November 25, 2024 22:21
mgol added a commit that referenced this pull request Nov 25, 2024
So far, we were mostly optimizing gzipped sizes. However, using Brotli is more
and more popular as all modern browsers support it and compression is much
better. It makes sense to also pay attention to these numbers.

The `comparseSize` version stays at `2` as this only introduces a new field
without affecting existing ones. The only drawback is comparisons with branches
that didnt have Brotli computed before will return `NaN`. This can be easily
fixed locally by checking out the branch and running the build, but at least
we don't lose gzipped sizes in the meantime.

Closes gh-5586

(cherry picked from commit e4b5e62)
@mgol
Copy link
Member Author

mgol commented Nov 25, 2024

Landed on main in e4b5e62 and on 3.x-stable in 015dc50.

@mgol mgol added this to the 3.7.2 milestone Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants