-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
gzip and nginx optimize module for static assets #2955
Comments
Our operational provisioning isn't part of this repository. We're happy to have any suggestions, but the provisioning and other operational pieces are all private projects. |
Can it be made open-source? There is a campaign going on to open-source not just the code but all the things used to maintain it. As of now, readthedocs.io is quite slow and I want to submit a PR that does some major performance tweaks. |
What in particular are you wanting to have gzipped? We already have this config:
|
I've updated it in a PR to:
|
google has a NGINX module that does all of this automatically https://www.modpagespeed.com/doc/build_ngx_pagespeed_from_source
|
I'm not following. Are you wanting us to minify the JS along with gzipping it? I don't feel comfortable changing the actual served JS content of folks, other than compressing it, at scale. |
Google PageSpeed insights suggests:
And Google provides NGINX and Apache modules to apply those optimizations automatically |
@CrazyPython I have just some comments/questions on this:
This is already done. Just #3564 missing
What's needed for this? I think with the public code you can propose a PR, right? How complicated it is? How much work does this involve?
What is needed for this?
From Eric's reply I think this is not going to be done in the near future. |
Would you consider using the NGINX module google made that does the optimizations automatically? |
I largely agree with most of this. However some of it may go into other places.
I don't think RTD should modify the HTML output of docs builds to this extent. If an author has put inline JS into their docs (using a retructuredtext
Similar to the above point, this should happen but I would argue the theme should do it. I don't think RTD should be modifying people's build output in that way.
This is something that RTD can do, although I think it might be a bit more complex than just adding an nginx module. Of these 3 things, this will also make the largest performance impact for visitors on repeat visits to RTD. Take for example, the pageload for https://docs.readthedocs.io/en/latest/ :
The default browser caching on media.readthedocs.org caches for 7 days and it uses eTags. There is no caching on the generated build output although there are eTags. The generated build output could change build to build (for example, some custom CSS a user has for overriding a theme) so I don't think RTD can do much there in terms of caching other than eTags which are already on. The files on media.readthedocs.org in theory can change on a new deploy of RTD although some are static forever in practice. This is where the opportunity for caching is, IMO. One of the easiest optimizations would be to set multi-year/forever cache times for files we know never change. RTD could do this for the fonts, for Since these files are written by |
Is there anything else actionable here that we want to do? |
This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further. Thanks! |
I'm asking because I want to submit a pull request letting static assets be compressed with
gzip
.The text was updated successfully, but these errors were encountered: