Thank you all for your feedback! I have fixed up my PR (
https://github.com/django/django/pull/8819) to add support for
watchman-based reloading, and it seems to be working well locally. After
further investigation I don't think using the Watchdog library is suitable
for Django, it seems to be
I'd just like to second (or third) an appetite for this or a similar
change. Lately I've started to notice very poor performance (high cpu
usage, slow shutdowns, etc) with the django dev server on my project. I've
moved to runserver_plus/werkzeug with watchdog in the mean time but it'd be
good
If we need some dogfooding with real-world candidates, I'd be happy to
provide some. We have a project which currently takes ~20 minutes to start
up (automated data models created by introspecting a database) that might
be a good edge-case candidate.
--
You received this message because you
Hello Tom,
I think the PR is on the right track. Now it needs to be taken beyond the
"proof of concept" stage.
Once you have code, docs, and if possibly some tests — currently there are few
due to the difficulty of testing auto reloading, especially edge cases — for
steps 1 and 2, I can
Thanks for the feedback! Watchdog does include a stat watcher, and I think
we can delegate to that. Currently we turn on the file system notifications
if the library is available, but we should add a '--stat' flag to disable
this it you are running on filesystems that don't support this. At which
Hi Tom,
Thank you for the great summary.
> 2. Add support for the "watchdog" library as a replacement for
> pyinotify. Watchdog implements file system notifications for all major
> platforms using a fairly simple API, so we can remove polling and have
> instant reloading. Also support Watchman,
Hello,
I've been thinking on and off about how to improve the autoreloader
implementation and I wanted to gather some feedback on potential solutions.
For some background, Django uses a fairly basic autoreload implementation
that simply polls the last modified time for loaded Python files once a