Make useFsEvents as default strategy for the watching#50366
Merged
sheetalkamat merged 10 commits intomainfrom Sep 6, 2022
Merged
Make useFsEvents as default strategy for the watching#50366sheetalkamat merged 10 commits intomainfrom
sheetalkamat merged 10 commits intomainfrom
Conversation
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Now that we have gotten better at handling inode movement etc and many people have tried using
useFsEventsas default for watching files, make it default. This should give more agile callbacks compared to polling especially if it involves lots of files. It should also be better on CPU.One catch on systems which have limits on fs watchers like linux, it would still fallback to polling but that was anyways done for the recursive directory watching so files is no different, but quantity varies so something to keep in mind.
This change also ensures that fsWatches are cached and reused with multiple callbacks instead of creating different fs watcher.
Most of the changes are refactoring on better baseline test infra update
10a7b4e actually has change to make fsEvents as default for file watching
61a99bf has change to cache the watches per name even when using fsEvents