-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[CHORE] 11! #6819
[CHORE] 11! #6819
Conversation
4c650b8
to
98f7ead
Compare
f04a1e7
to
0fe1503
Compare
Asset Size Report for 39938ec EmberData has not changed in sizeIf any packages had changed sizes they would be listed here. Changeset
Full Asset Analysis
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Math LGTM. I'm only commenting on naming things.
cac3a9b
to
bd3e4d1
Compare
Performance Report for 39938ec Relationship Analysis
|
Fwiw a commit message that mentions that this is related to asset size diffing/etc. would've been great. It's pretty hard to tell what 11! refers to when going through a list of commits |
We've been compressing at max because the default brotli setting is 11, but this makes it explicit just in case that default is ever different.
It also tidies up a bit how we do our compression math, which makes it easier to improve our diff.
We improve our diff by adjusting the formula for how we calculate the delta in compression.
Before, the delta for individual modules and packages was calculated like this:
While on the surface this equation seems to make sense, because compression is not directly related to the relative size of a package it results in module/package compression deltas that do not sum to the overall compression delta of the library. Because the module or package changes its "% of the library", the two sizes are not directly comparable leading to an exaggerated compression delta that is less meaningful.
In this PR we shift to a strategy that is comparable and will sum to the overall library compression delta.
From a Math perspective we've made the following change in our formula;
Given the following:
Our initial formula was:
And our new formula is:
These equations are not equivalent.
Example Analysis of an asset size change prior to this formula update: #6814 (comment)
Example Analysis of an asset size change after this formula update:
#6814 (comment)