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
Need to speed up the Documentation build in CI #5352
Comments
I had a chat with Sphinx's expert friend, they are running a full build once daily on the main branch and doing incremental builds based on the artifacts of |
The v4 upload_artifacts is supposedly much faster, this is currently taking >30 minutes on some PRs. This is not the majority of time but any decrease would help. Another thought is that the interactive documentation takes an extra amount of time, we could turn off by default for PRs, turn on via label. There are probably a bunch of opportunities here that are quick wins that have low downsides. |
Good idea. To add, we can try interactive builds in the preview document build. So there is no problem to keep the PR document build in CI static at all times. |
This is a good idea indeed. If you think this would be valuable I can create a PR where the global behavior (all static vs interactive) is controlled via an environmental variable which is easy to set also in CI. |
That would be perfect. |
I have come up with a good method for this. We can get a list of files that have been modified compare with the main branch with the following command. Running the touch command against that file solves the correctness problem. git diff --name-only main...$CURRENT_BRANCH |
Might be worth considering using sphinx-remove-toctrees. Apparently having lots of auto-generated cross-references from toctrees can slow build times considerably as it takes time to resolve all the cross-references. See also the relevant docs for the pydata theme: For full documentation builds and releases I don't think we necessarily want to exclude any toctrees. So, this won't reduce build times for that. But, we could possibly add a new workflow to the CI, e.g. |
Another possible solution for this: allow selectively building only part of the docs with CLI options. E.g. pandas has a mechanism like this, see: https://pandas.pydata.org/docs/development/contributing_documentation.html#building-the-documentation Link to the pandas |
I'm considering using the way that |
This sounds like a very good idea. If we can split the build process, we can split the GitHub Action process. Then, we could run them in parallel to save time. |
Describe what maintenance you would like added.
The documentation build time is more of an issue of trying to do too much for each commit. Ideally we'd be able to do incremental builds. Barring that, I feel that waiting 90 minutes for CI checks really inhibits the development experience and we might consider an abbreviated build for PRs and run the full build on main and potentially on doc/* branches.
Originally posted by @akaszynski in #5344 (comment)
Links to source code.
https://github.com/pyvista/pyvista/blob/main/.github/workflows/docs.yml
Pseudocode or Screenshots
None
The text was updated successfully, but these errors were encountered: