From 139b6b43c77d1f32486b897760534a102683ddba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fe=CC=81lix=20Saparelli?= Date: Sun, 11 Apr 2021 06:05:28 +1200 Subject: [PATCH] Drop debounce to 150ms (#168) --- completions/zsh | 2 +- doc/watchexec.1 | 2 +- doc/watchexec.1.html | 2 +- doc/watchexec.1.ronn | 2 +- src/args.rs | 2 +- src/config.rs | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/completions/zsh b/completions/zsh index 4186f5a..e81a836 100644 --- a/completions/zsh +++ b/completions/zsh @@ -22,7 +22,7 @@ args=( '(-V --version)'{-V,--version}'[Prints version information]' '(-v --verbose)'{-v,--verbose}'[Print debugging messages to stderr]' '--changes-only[Print changed paths to stderr for pattern debugging]' - '(-d --debounce)'{-d+,--debounce=}'[Set the timeout between detected change and command execution, defaults to 500ms]:milliseconds' + '(-d --debounce)'{-d+,--debounce=}'[Set the timeout between detected change and command execution, defaults to 150ms]:milliseconds' '(-e --exts)'{-e+,--exts=}'[Comma-separated list of file extensions to watch (js,css,html)]:extensions' '(-f --filter)'{-f+,--filter=}'[Ignore all modifications except those matching the pattern]:pattern' '(-i --ignore)'{-i+,--ignore=}'[Ignore modifications to paths matching the pattern]:pattern' diff --git a/doc/watchexec.1 b/doc/watchexec.1 index d84225a..0b90b89 100644 --- a/doc/watchexec.1 +++ b/doc/watchexec.1 @@ -92,7 +92,7 @@ Poll for changes every \fIinterval\fR ms instead of using system\-specific notif . .TP \fB\-d\fR, \fB\-\-debounce\fR -Set the timeout between detected change and command execution, to avoid restarting too frequently when there are many events; defaults to 500ms\. +Set the timeout between detected change and command execution, to avoid restarting too frequently when there are many events; defaults to 150ms\. . .TP \fB\-\-no\-vcs\-ignore\fR diff --git a/doc/watchexec.1.html b/doc/watchexec.1.html index afd15a1..f51a1c5 100644 --- a/doc/watchexec.1.html +++ b/doc/watchexec.1.html @@ -115,7 +115,7 @@
-c, --clear

Clears the screen before executing command.

-p, --postpone

Postpone execution of command until the first file modification is detected.

--force-poll interval

Poll for changes every interval ms instead of using system-specific notification mechanisms (such as inotify). This is useful when you are monitoring NFS shares.

-
-d, --debounce

Set the timeout between detected change and command execution, to avoid restarting too frequently when there are many events; defaults to 500ms.

+
-d, --debounce

Set the timeout between detected change and command execution, to avoid restarting too frequently when there are many events; defaults to 150ms.

--no-vcs-ignore

Skip loading of version control system (VCS) ignore files. By default, watchexec loads .gitignore files in the current directory (or parent directories) and uses them to populate the ignore list.

--no-default-ignore

Skip default ignore statements. By default, watchexec ignores common temporary files for you, for example *.swp, *.pyc, and .DS_Store.

-v, --verbose

Prints diagnostic messages to STDERR.

diff --git a/doc/watchexec.1.ronn b/doc/watchexec.1.ronn index 47b53b3..715af44 100644 --- a/doc/watchexec.1.ronn +++ b/doc/watchexec.1.ronn @@ -68,7 +68,7 @@ Postpone execution of until the first file modification is detected. Poll for changes every ms instead of using system-specific notification mechanisms (such as inotify). This is useful when you are monitoring NFS shares. * `-d`, `--debounce`: -Set the timeout between detected change and command execution, to avoid restarting too frequently when there are many events; defaults to 500ms. +Set the timeout between detected change and command execution, to avoid restarting too frequently when there are many events; defaults to 150ms. * `--no-vcs-ignore`: Skip loading of version control system (VCS) ignore files. By default, watchexec loads .gitignore files in the current directory (or parent directories) and uses them to populate the ignore list. diff --git a/src/args.rs b/src/args.rs index 617e9a9..3d37ca9 100644 --- a/src/args.rs +++ b/src/args.rs @@ -72,7 +72,7 @@ where .short("k") .long("kill")) .arg(Arg::with_name("debounce") - .help("Set the timeout between detected change and command execution, defaults to 500ms") + .help("Set the timeout between detected change and command execution, defaults to 150ms") .takes_value(true) .value_name("milliseconds") .short("d") diff --git a/src/config.rs b/src/config.rs index 97304da..f7bcb14 100644 --- a/src/config.rs +++ b/src/config.rs @@ -44,7 +44,7 @@ pub struct Config { #[builder(default)] pub on_busy_update: OnBusyUpdate, /// Interval to debounce the changes. - #[builder(default = "Duration::from_millis(500)")] + #[builder(default = "Duration::from_millis(150)")] pub debounce: Duration, /// Run the commands right after starting. #[builder(default = "true")]