watcher icon indicating copy to clipboard operation
watcher copied to clipboard

make debounce time configurable

Open devongovett opened this issue 7 years ago • 3 comments

devongovett avatar Apr 01 '19 05:04 devongovett

This would be nice for speeding up test suites.

Currently I'm waiting 100ms after a batch of changes before I can expect stuff.

aleclarson avatar Mar 16 '21 00:03 aleclarson

@devongovett just to clarify, there is a 50ms debounce delay across all platforms to collect events before emitting. right? I was curious about the debounce delay that is used and found this:

https://github.com/parcel-bundler/watcher/blob/728f9a4283129c05f8909379b5b6b4e879789b99/src/Debounce.hh#L63

bpasero avatar Oct 04 '21 05:10 bpasero

Updated the defaults in #113 to always emit the first change immediately with no delay, while batching subsequent changes. That might help a little. Making it configurable is a bit difficult because currently the debouncer is a singleton.

devongovett avatar Oct 30 '22 02:10 devongovett