GeezerVison is showing github.com — watch: decrease debounce rate · nodejs/node@b79b292
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: lib/internal/main/watch_mode.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -44,7 +44,7 @@ const args = ArrayPrototypeFilter(process.execArgv, (arg, i, arr) => | 44 | 44 | arg !== '--watch' && arg !== '--watch-preserve-output'); | 45 | 45 | ArrayPrototypePushApply(args, kCommand); | 46 | 46 |
| 47 | | -const watcher = new FilesWatcher({ debounce: 500, mode: kShouldFilterModules ? 'filter' : 'all' }); | | 47 | +const watcher = new FilesWatcher({ debounce: 200, mode: kShouldFilterModules ? 'filter' : 'all' }); | 48 | 48 | ArrayPrototypeForEach(kWatchedPaths, (p) => watcher.watchPath(p)); | 49 | 49 |
| 50 | 50 | let graceTimer; | |
Collapse file Copy file name to clipboardExpand all lines: lib/internal/test_runner/runner.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -428,7 +428,7 @@ function runTestFile(path, root, inspectPort, filesWatcher, testNamePatterns) { | 428 | 428 | function watchFiles(testFiles, root, inspectPort, signal, testNamePatterns) { | 429 | 429 | const runningProcesses = new SafeMap(); | 430 | 430 | const runningSubtests = new SafeMap(); | 431 | | - const watcher = new FilesWatcher({ debounce: 500, mode: 'filter', signal }); | | 431 | + const watcher = new FilesWatcher({ debounce: 200, mode: 'filter', signal }); | 432 | 432 | const filesWatcher = { __proto__: null, watcher, runningProcesses, runningSubtests }; | 433 | 433 |
| 434 | 434 | watcher.on('changed', ({ owners }) => { | |
Collapse file Copy file name to clipboardExpand all lines: lib/internal/watch_mode/files_watcher.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -31,7 +31,7 @@ class FilesWatcher extends EventEmitter { | 31 | 31 | #mode; | 32 | 32 | #signal; | 33 | 33 |
| 34 | | - constructor({ debounce = 500, mode = 'filter', signal } = kEmptyObject) { | | 34 | + constructor({ debounce = 200, mode = 'filter', signal } = kEmptyObject) { | 35 | 35 | super(); | 36 | 36 |
| 37 | 37 | validateNumber(debounce, 'options.debounce', 0, TIMEOUT_MAX); | |
|