docs: parallelize Read the Docs HTML build - #5888
Conversation
Override the Read the Docs HTML command to use two Sphinx workers while preserving the existing builder, language, doctree, and output settings. Coding-Agent: Codex Codex-Version: codex-cli 0.144.6 Model: gpt-5.6-sol Reasoning-Effort: xhigh
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Read the Docs configuration adds an explicit Sphinx HTML build command using two workers, English language settings, ChangesRead the Docs build
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #5888 +/- ##
==========================================
- Coverage 79.03% 78.81% -0.22%
==========================================
Files 1055 1067 +12
Lines 122233 123805 +1572
Branches 4401 4510 +109
==========================================
+ Hits 96607 97581 +974
- Misses 24061 24614 +553
- Partials 1565 1610 +45 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Run the custom Sphinx command from the documentation directory so the source checkout does not shadow the installed package. Add a 45-minute timeout with a forced-kill grace period to turn stalled parallel builds into explicit failures. Coding-Agent: Codex Codex-Version: codex-cli 0.144.6 Model: gpt-5.6-sol Reasoning-Effort: xhigh
dargs.sphinx.DargsDomain advertises parallel_read_safe but does not implement merge_domaindata, so Sphinx refuses to combine the per-worker inventories and -j aborts the build. The domain's only state is a flat targetid -> (docname, objtype) map, so merging is a dict update restricted to the documents the worker read. Verified on a minimal two-page project using dargs directives: -j 2 fails with the same NotImplementedError without the shim and succeeds with it.
|
Rebased onto master and made The RTD build on this branch was failing at 655 s with:
Verified on a minimal two-page project using For context on why this matters beyond this PR: the |
Summary
-j 2.Performance measurement
This PR intentionally contains only the Sphinx worker-count change so its Read the Docs preview measures parallelism independently.
Baseline Read the Docs build 33680413:
Both performance PRs use upstream commit
83e7245646185a2de8f7d6277edc4f64b4f500f0as their base.Testing
.readthedocs.ymlwith PyYAML-j 2ruff check .ruff format .Coding agent: Codex
Codex version: codex-cli 0.144.6
Model: gpt-5.6-sol
Reasoning effort: xhigh
Summary by CodeRabbit