alexch / rerun

Restarts an app when the filesystem changes. Uses growl and FSEventStream if on OS X.
Other
984 stars 80 forks source link

rerun is slow #72

Open orborde opened 9 years ago

orborde commented 9 years ago

On Linux, rerun takes up to a second to notice and relaunch my command after a file change. This is an annoying delay during rapid iteration (which is the whole point of rerun).

Compare the following two commands (run them side by side in two terminals):

rerun --pattern=some_pattern 'date +"%T.%N"'

vs

while true; do date +"%T.%N"; inotifywait -q some_pattern; done

On my system, rerun prints a date roughly a second later than the comparable bash snippet after I save a change to a monitored file.

alexch commented 6 years ago

This might be an adapter issue. The fallback polling adapter can take a lot longer. See https://github.com/guard/listen#listen-adapters for more info.

Can you try to gem update listen rerun and see if the new versions use a good Linux adapter? It should say what adapter it's using on the console, like this:

13:53:36 [rerun] Watching . for **/*.{rb,js,scss,sass,erb,html,md} with Windows adapter