-
Notifications
You must be signed in to change notification settings - Fork 13
Description
Describe the feature you’d like to be implemented
On trying out ghciwatch for the first time, I was surprised to find that it felt noticeably less snappy than ghcid. It turns out this is because reloads are delayed by half a second for debouncing purposes. This is unnecessary on Linux (and possibly BSDs etc. ?) since inotify reliably sends a single CLOSE_WRITE event when a file is written to disk. From my own past experiments with exec-on-save behaviour, I have found that other common OSs are disappointingly unsophisticated, which is what makes debouncing necessary.
List alternatives to the feature and their pros and cons
- Look in to what exactly
ghciddoes. - Reduce the default debounce interval across the board. I seem to remember I tested pretty thoroughly on Windows and MacOS before deciding 0.1s was safe here.
Additional context
From the fact that --debounce=0s works perfectly fine on my Linux machine, in that ghciwatch doesn't attempt to reload twice, I'm assuming that the Rust file watching library being used is already delegating to CLOSE_WRITE on Linux. I haven't actually checked this.