-
Notifications
You must be signed in to change notification settings - Fork 212
Compress html documents when sending them to the user #360
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
I wondered for a long time if we should handle compression directly inside rustdoc. That could be a good time to talk about it as well... |
If the docs are compressed locally, |
It would indeed. Which is why we never did. |
@GuillaumeGomez The current possible solution may be minifying the html resource which can probably shave like ~5% off while keeping the same output without much changes. What do you think? Of course, compared to compressing which could save like 90% off it's small. Just compressing individual files already get 10% of original size, think compressing after archiving into tarball.
|
If the web browsers can still work with local compressed files, then I'm totally going to add it. |
NGINX & CloudFront are serving compressed content when the browser supports it. So I assume this issue is solved. Please feel free to reopen if not. |
The local docs are not compressed, it took up 635 MB for the current stable, half the size of the whole toolchain (1.2 GB). I think we can reopen this, but one issue is browser does not work with locally compressed files. |
This repo here is purely about https://docs.rs . "local docs" sounds like this is about rustdoc itself (when it's about crate docs), which lives in https://github.com/rust-lang/rust , or the std docs, which live there too. |
Html documents served by docs.rs are not compressed resulting in large bandwidth waste on pages for complex types.
See for example the iterator page as discussed here: rust-lang/rust#55900 (comment)
The text was updated successfully, but these errors were encountered: