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
524 stars 75 forks source link

File System 'Jitter' Results In Many Unnecessary Rebuild Triggers #50

Closed 7enderhead closed 3 years ago

7enderhead commented 7 years ago
slestak commented 5 years ago

--ignore argument resolves this I believe.

nkuttler commented 4 years ago

I think I have the same problem when using git:

Whenever I switch branches I get a new sphinx build for each changed file into the queue, but I only need one single rebuild of the docs. Neither --delay nor --poll seem to help with this, I was hoping that polling would disable inotify (which I assume is used), and I was hoping that delaying would result in only the top queued rebuild being triggered.

If you need help fixing this please let me know, I use sphinx-autobuild on multiple projects and seem to face this everywhere.

nkuttler commented 4 years ago

Did somebody comment and delete their comment? -r doesn't solve the problem at all, excluding the repository is wrong because large parts of the sphinx documentation are docstrings and such.

slestak commented 4 years ago

I did delete my comment, I apologize. It was redundant with the --ignore info discussed above. I'll leave this here.

nkuttler commented 4 years ago

Neither --ignore nor --re-ignore seem related to the problem described here. The problem seems to be that watchdog fills up the queue with events that are irrelevant to sphinx-autobuild, and that the queue should be cleared sometimes. Otherwise sphinx-autobuild will repeat the same action with the same outcome over and over and just use up system resources.

Looking at the watchdog I couldn't find a way to do this either, so perhaps I need to find an entirely different solution to build my docs.

pradyunsg commented 3 years ago

Definitely something that needs to be fixed.

pradyunsg commented 3 years ago

This might be fixed by #88.

Could someone try the current master (pip install https://github.com/GaretJax/sphinx-autobuild/archive/develop.zip) and confirm whether this behavior is now fixed?

pradyunsg commented 3 years ago

I've been using this for https://github.com/pradyunsg/furo 's development and I reckon this is solved now. :)