Closed Ameobea closed 5 years ago
@Ameobea Thanks for posting this. Seems to be related to: #145 . Although I believe this is a bigger issue. I think part of the issue is that since the watcher now executes a child_process of eslint executable and no longer uses Eslint's API, that ESW has started to take more resources than in previous versions.
Debounce will work for me for this case.
This should be fixed with v5.1.0
Environment
^5.0.1
Basic Description of the problem
Whenever operations that create many file changes such as a
bit checkout
orgit pull
occur whileeslint-watch
is running,eslint-watch
triggers dozens of concurrenteslint
processes to be created for what I assume is each of the individual file changes. If the--changed
option is not specified, this has the effect of making the system close to unusable due to the high resource usage of theeslint
processes.How to reproduce it
esw
git checkout develop
that introduces changes to many (50+, for example) filesDebug output:
In the case that the
--changed
option is not specified, file changes should be debounced. Just waiting ~50ms after a file change and watching for other file changes in that time period (resetting the timer after each one) and then only spawning theeslint
process once they've all completed should solve this.