-
Notifications
You must be signed in to change notification settings - Fork 12k
Show gzip compression size after build #21394
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
Comments
This is quite interesting however, I think this is quite misleading because there is no real equation to determine the true gzip size that the file will be served with from the actual web-server. Gzip have 9 different compression levels which can vary from one server or hosting provider to another. The higher the compression level, the smaller the file and the more computationally expensive the compression is. Typically hosting providers set the level somewhere the middle range, to have a good balance between size and compression cost. Considering this, I don’t think it would be a good idea to display these sizes, since one might expect that, what we display is what is transferred over the network, which in many cases it will not be the case for the reasons explained above. All in all, while compression would improve one of the performance matrix which is reducing the data transfer over the wire. The file size still matters as compressing the file with Gzip or even Brotli will not improve the scripting time, where the true size of the file matters. |
It uses gzip-size, which uses Gzip level 9 This means that webpack-bundle-analyzer displays the smallest possible gzip size, but it is very unlikely this reflects the true gzipped size served by a web-server. Since, it's highly unlikely that a web-server will use gzip level 9. |
I should close issue? |
We did discuss this in our weekly meeting, and we decided that providing an "estimate transfer size" would be beneficial. We also discussed that this size should be done by using Node.JS Brotli API. |
Hey @alan-agius4 let me know if I can take this one. |
…uild output report When optimizations are enabled (either scripts or styles), an additional column will now be present in the output report shown in the console for an application build. This additonal column will display the estimated transfer size for each file as well as the total initial estimated transfer size for the initial files. The estimated transfer size is determined by calculating the compressed size of the file using brotli's default settings. In a development configuration (a configuration with optimizations disabled), the calculations are not performed to avoid any potential increase in rebuild speed due to the large size of unoptimized files. Closes: angular#21394
…uild output report When optimizations are enabled (either scripts or styles), an additional column will now be present in the output report shown in the console for an application build. This additonal column will display the estimated transfer size for each file as well as the total initial estimated transfer size for the initial files. The estimated transfer size is determined by calculating the compressed size of the file using brotli's default settings. In a development configuration (a configuration with optimizations disabled), the calculations are not performed to avoid any potential increase in rebuild speed due to the large size of unoptimized files. Closes: angular#21394
…uild output report When optimizations are enabled (either scripts or styles), an additional column will now be present in the output report shown in the console for an application build. This additonal column will display the estimated transfer size for each file as well as the total initial estimated transfer size for the initial files. The estimated transfer size is determined by calculating the compressed size of the file using brotli's default settings. In a development configuration (a configuration with optimizations disabled), the calculations are not performed to avoid any potential increase in rebuild speed due to the large size of unoptimized files. Closes: angular#21394
…uild output report When optimizations are enabled (either scripts or styles), an additional column will now be present in the output report shown in the console for an application build. This additonal column will display the estimated transfer size for each file as well as the total initial estimated transfer size for the initial files. The estimated transfer size is determined by calculating the compressed size of the file using brotli's default settings. In a development configuration (a configuration with optimizations disabled), the calculations are not performed to avoid any potential increase in rebuild speed due to the large size of unoptimized files. Closes: #21394
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
🚀 Feature request
Command (mark with an
x
)Description
Describe the solution you'd like
In many ways, we always know that the real size of a completely different will be transmitted over the network by the user
The text was updated successfully, but these errors were encountered: