Skip to content

DOC: enable parallel building of the docs #15591

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

Closed
jorisvandenbossche opened this issue Mar 6, 2017 · 8 comments · Fixed by #19634
Closed

DOC: enable parallel building of the docs #15591

jorisvandenbossche opened this issue Mar 6, 2017 · 8 comments · Fixed by #19634
Labels
Milestone

Comments

@jorisvandenbossche
Copy link
Member

jorisvandenbossche commented Mar 6, 2017

Sphinx supports building the docs in parallel using multiple processes (with eg -j 4), see http://www.sphinx-doc.org/en/stable/invocation.html#cmdoption-sphinx-build-j

I quickly tested this, and that seems to reduce on my laptop (with 4 processes) build time from ca 17 min to 8 min.
This also takes a lot more memory, so not sure if we want to enable it by default, but it would be nice to at least give the possibility to specify this with python make.py html.

@jreback do you know if we can use multiple processes in parallel on travis?

What this needs:

  • update the sphinxext (ipython directive and numpydoc) to allow parallel read (incorporate some upstream changes into our vendored versions)
  • update make.py to be able to pass the -j argument
@jreback
Copy link
Contributor

jreback commented Mar 6, 2017

we do this from for testing now with pytest-xdist
but only -n 2

as travis machines have 2 cores (and more doesn't seem to help)

@jorisvandenbossche
Copy link
Member Author

OK, so the option might be useful for building the docs on travis as well.

@jreback
Copy link
Contributor

jreback commented Mar 6, 2017

I would also pass a single -v (which is only slightly more verbose)

jreback added a commit to jreback/pandas that referenced this issue Mar 7, 2017
jreback added a commit to jreback/pandas that referenced this issue Mar 7, 2017
closes pandas-dev#15591

remove use of pd.Term from docs
@jreback jreback closed this as completed in a347ecb Mar 7, 2017
@jorisvandenbossche
Copy link
Member Author

@jreback reopening this, as this not yet fully solved (the vendored sphinx extension need updates (otherwise only the writing is parallel), and optionally provide this as an option to make.py)

@jreback
Copy link
Contributor

jreback commented Mar 7, 2017

the vendored sphinx extension need updates (otherwise only the writing is parallel

what does this mean? (e.g. 1.5.1 i not working)?

optionally provide this as an option to make.py

why I don't think this is a big deal anyhow

@jorisvandenbossche
Copy link
Member Author

Our vendored versions are not 'parallel_read_safe' to sphinx, and therefore you get the message like

WARNING: the ipython_sphinxext.ipython_directive extension does not declare if it is safe for parallel reading, assuming it isn't - please ask the extension author to check and make it explicit
WARNING: doing serial read

and it is actually not using the parallel feature (for reading)

@jreback
Copy link
Contributor

jreback commented Mar 7, 2017

interesting, I don't see that locally....

AnkurDedania pushed a commit to AnkurDedania/pandas that referenced this issue Mar 21, 2017
closes pandas-dev#15591

a couple of minutes faster with -j 2.
fixes some deprecated use of pd.Term

Author: Jeff Reback <[email protected]>

Closes pandas-dev#15600 from jreback/docs and squashes the following commits:

c19303d [Jeff Reback] DOC: parallel build for docs
@datapythonista
Copy link
Member

What's the decision regarding this thread? Does it make sense to add a --jobs option to make.py that is given to sphinx-build -j argument? I guess that could be useful for contributors with many cores, even if the CI has only 2.

@jreback jreback added this to the Next Major Release milestone Feb 10, 2018
@jreback jreback modified the milestones: Next Major Release, 0.23.0 Feb 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants