[SPARK-46668][DOCS] Parallelize Sphinx build of Python API docs #44680
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
Upgrade to Sphinx 4.5.0, which is the latest in the 4.x line and includes the fix for parallel builds on macOS.
Enable parallel Sphinx workers to build the Python API docs.
I experimented with a few different values, and
auto
seems to work best. Configuring 4 workers seems to yield the same improvement asauto
, suggesting parallelization beyond that is ineffective due to some sort of resource contention. But I left it asauto
since that's more dynamic and should work better across varied environments.On my 16-core Intel workstation, the runtime of
make html
was cut by ~60%.Here on CI, the "Run documentation build" step seems also to have improved from the usual of ~50 minutes down to ~31 minutes.
Why are the changes needed?
This saves developer time and CI time.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
I manually built and reviewed the docs using:
Was this patch authored or co-authored using generative AI tooling?
No.