sphinx-doc / sphinx-autobuild

Watch a Sphinx directory and rebuild the documentation when a change is detected. Also includes a hot-reload web server.
MIT License
523 stars 75 forks source link

sphinx-autobuild has become very slow #136

Open asmeurer opened 11 months ago

asmeurer commented 11 months ago

Describe the bug

At some point recently, sphinx-autobuild has become really slow. I'm not really sure what has caused it. It might have something to do with a newer version of Sphinx. But when using it for the SymPy documentation, it takes something like 10 seconds to reload the page even after a trivial build. Sometimes it reloads the page into a completely blank page and I have to wait for the build to finish before it loads the real page again.

This is especially an issue given https://github.com/executablebooks/sphinx-autobuild/issues/125 and also the problem I described at https://github.com/executablebooks/sphinx-autobuild/pull/123. You cannot click on any links or anything while the build is happening. It just "hangs" effectively.

Reproduce the bug

Easiest way is to use it on the SymPy documentation. You can install the sympy documentation dependencies with the doc/requirements.txt file, and use

cd doc
make livehtml

to build the docs with live reloading. Note that the initial build is slow because there is a lot of documentation, but that's not the issue here. Try making a small change to some file after the page opens in your browser and seeing how long it takes to reload everything.

List your environment

sphinx-autobuild 2021.3.14 sphinx 6.2.1

guideloom commented 10 months ago

perhaps you are passing "-a" to sphinx-autobuild/sphinx-build some how? -a = build ALL, not just the changes.

asmeurer commented 10 months ago

I just tested that and it seems to make Sphinx rebuild everything with every change. I am most definitely not doing that. Believe me, I would know if it was doing that. The SymPy docs take a couple of minutes to do a full rebuild. Things are slow, but they aren't that slow.