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
Python wheels are not compressed by the CDN #3655
Comments
That's very Interesting. We should check the size of all wheel files + python_stdlib.zip. Probably we can also benefit from decompress speed if we use zip with 0 compression. |
I need to check with JsDelivr folks if it's possible to compress binary files. It may also be that whether it's compressed is defined by MIME type, and that we should change the MIME type from |
Yes, compression is based on mime type, and binaries are not compressed. Changing it to |
Thanks for the confirmation @MartinKolarik ! |
A big win for non-official-CDN would be compressing the |
Yes, this should be resolved in #3667. We were doing this previously for |
It looks like the JsDelivr CDN does not compress Python wheels.
For instance, if you load numpy,
it will download 3.1MB of wheel. It's not terrible as it will be zip compressed, but brotli should achieve better compression.
However, if one takes the wheel (zip file) and apply brotli, the size is still around 3.0MB. So re-compressing on top doesn't help much (and it's disabled currently).
While if we were to take these files, put them in a tar (or a zip with 0 compression) and brotli compress it, the size would be 1.9MB in this example. But then technically it's no longer a standard wheel file.
Still, maybe we should switch to producing wheels with no compression, forcing the CDN to re-compress them (if possible) and let the browser do the decompression.
Anyway, also to keep this in mind when repacking more optimized bundles.
The text was updated successfully, but these errors were encountered: