Describe the performance issue
We default to collapse_navigation=False which means our navigation sidebar looks like this:
where the whole tree is navigable from all pages.
if set to True it looks like this:
Building the sunpy documentation with collapse_navigation=True takes 145.82 s.
Details
$ tox -e build_docs -- -D html_theme_options.collapse_navigation=True -aE -j 2
[...]
build_docs: commands[2] /home/stuart/Git/sunpy/docs> python -c 'import pathlib; print("Documentation available under file://{0}".format(pathlib.Path(r"/home/stuart/Git/sunpy") / "docs" / "_build" / "index.html"))'
Documentation available under file:///home/stuart/Git/sunpy/docs/_build/index.html
build_docs: OK (156.30=setup[9.88]+cmd[0.29,0.29,145.82,0.03] seconds)
congratulations :) (156.35 seconds)
and building the sunpy documentation with collapse_navigation=False takes 372.00 s.
Details
$ tox -e build_docs -- -D html_theme_options.collapse_navigation=False -aE -j 2
[...]
build_docs: commands[2] /home/stuart/Git/sunpy/docs> python -c 'import pathlib; print("Documentation available under file://{0}".format(pathlib.Path(r"/home/stuart/Git/sunpy") / "docs" / "_build" / "index.html"))'
Documentation available under file:///home/stuart/Git/sunpy/docs/_build/index.html
build_docs: OK (381.91=setup[9.35]+cmd[0.27,0.27,372.00,0.03] seconds)
congratulations :) (381.95 seconds)
**
Proposed fix
We could set this as the default in the theme, as astropy have done. Or we could conditionally set it for just sunpy, or just tox builds of the sunpy docs (but not RTD) for example.
Describe the performance issue
We default to
collapse_navigation=Falsewhich means our navigation sidebar looks like this:where the whole tree is navigable from all pages.
if set to
Trueit looks like this:Building the sunpy documentation with
collapse_navigation=Truetakes 145.82 s.Details
and building the sunpy documentation with
collapse_navigation=Falsetakes 372.00 s.Details
Proposed fix
We could set this as the default in the theme, as astropy have done. Or we could conditionally set it for just sunpy, or just tox builds of the sunpy docs (but not RTD) for example.