From 831d4f5ac2bc8a184b78e0c57ba7ff2725b67f7f Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Fri, 6 Jan 2023 11:34:50 -0500 Subject: [PATCH] Re-enable parallel sphinx builds by default With the recent merge of #9346 that stopped using the problematic jupyter-sphinx plugin we're no long blocked from running sphinx-build in parallel anymore. We had originally enabled this in #4477 to get a speed boost during docs builds. However, we were forced to revert that in #6539 because jupyter-sphinx was unreliable and had a race condition when 2 jupyter-execute blocks were run at the same time (see #5904 for more details). Since we've removed the jupyter-sphinx usage that is no longer a problem and we can reliably run parallel sphinx builds again. This commit makes that change and changes the default sphinx-build behavior when run via tox (as is done via ci) to use all available system cores to perform a sphinx build. Annecdoteally this provides a nice speed up, on my local workstation a full docs build went from taking 8min 42 seconds for a serial build to 2min 35sec with a parallel build. --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index b32e01086c03..5df99a336639 100644 --- a/tox.ini +++ b/tox.ini @@ -76,7 +76,7 @@ deps = -r{toxinidir}/requirements-dev.txt qiskit-aer commands = - sphinx-build -W -T --keep-going -b html docs/ docs/_build/html {posargs} + sphinx-build -W -j auto -T --keep-going -b html docs/ docs/_build/html {posargs} [pycodestyle] max-line-length = 105