rerun
rerun copied to clipboard
rerun is slow
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.
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