-
-
Notifications
You must be signed in to change notification settings - Fork 816
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
Override RTD build commands to speed up docs build #933
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change looks good to me.
It seems that the only downside is that the feature is in beta, and currently doesn't support the flyout menu. Do you know if there is any ETA for that?
Hi! Thanks for the ping here.
Currently, we don't have an ETA. However, we are working on all the context around this feature that is required to be decoupled from the build process itself to be customizable and "injectable" into already built HTML files --since there are some Sphinx extensions (where we run Read the Docs' specific code) that won't be installed anymore when people overrides all the commands. We published it as "beta" because of the current features limitations that you already found and also because we weren't sure how people will use this feature exactly. The current state of this feature has been helping us to collect feedback to continue building the feature in the direction that it's useful for most of our users. Originally, the
The fix for this problem (readthedocs/readthedocs.org#9473) is going out in today's deploy. The build is unpinning I hope this clarifies a little the situation. I'm happy to help here in case you have any other doubts. I'll keep an eye on this PR to read following conversations. Again, thanks for the ping on it. It's really useful for us to know what people is doing and why they decided to use |
Thanks! Will retest after today's deploy.
Arguably this is a partial fix: it will download/install much quicker but we don't need Pillow (and many of the external dependencies like old Sphinx and sphinx-rtd-theme) so it will still be downloading several MB of unnecessary packages, and it would be nice to try and reduce the (100% discounted but) $1.8M/month bill for PyPI. |
Yes. I agree. There are other set of work we have started to discuss some time ago that will eventually allow different types of customizable builders. This is a long term plan, tho. We do no have the resources to start working on this immediately, unfortunately. |
After deploy
Total command time: 37s Build took 72 seconds (includes command time and upload time) https://readthedocs.org/projects/hugovk-devguide/builds/17667806/ Comparison
|
If we don't go for this PR (and we could do it even if we do): would we like @humitos to enable the feature flag See readthedocs/readthedocs.org#9118 (comment) for details. I think it's a good idea (whether we merge this PR or not). |
I see two thumbs up from core devs to my previous question 👍 @humitos Hi again! Please could you enable |
@hugovk I just enabled |
Will do, thank you! (I can see now we just get the single Sphinx download, as expected.) |
Similar to python/peps#2728.
ReadTheDocs now has a beta feature to override the build commands:
Right now, a whole bunch of dependencies are installed that we don't use.
This can be slow especially as some old dependencies are built from source because they don't support modern Python and don't have wheels available (e.g. readthedocs/readthedocs.org#9118).
Instead, we can just
make html
to only install the stuff we need.This speeds up the command-running time from ~61 to ~22 seconds (the upload is a constant ~30s in both cases).
Before
Each build step took:
Total command time: 61s
Build took 94 seconds (includes command time and upload time)
https://readthedocs.org/projects/cpython-devguide/builds/17656911/
After
Total command time: 22s
Build took 49 seconds (includes command time and upload time)
https://readthedocs.org/projects/hugovk-devguide/builds/17657155/