trait.Iterator.html is very large and loads slowly

trait.Iterator.html is 13.3 MiB in size and takes some time to load over a slow connection (not to mention render in the browser, but that’s a different issue).

It could gzip down to 0.7 MiB.

CloudFront can automatically compress files up to 10 MB in size only, and this appears to be on. https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/ServingCompressedFiles.html. According to this documentation, the fix might be somewhat involved, but it should be possible to gzip the files ahead of time and add the correct Content-Encoding header prior to uploading to S3.

The other solution would be to ensure all files are under 10 MB.

6 Likes

I think the correct, general solution is to improve rustdoc to serve a “lite” version of the documentation as well as the regular fancy one. Javadocs look horrible, but they load fast.

1 Like

I think this is a known issue: https://github.com/rust-lang/rust/issues/55900

It’s pretty slow for me, it takes about 15s to load. I should get in the habit of using a local copy, though.

Proposed fix at https://github.com/rust-lang/rust/pull/61505 takes it down to 724 KiB :tada:

7 Likes