-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support a non-recursive mode #92
Comments
What's the use case for a non-recursive mode for VS Code? |
@devongovett we have an ask in microsoft/vscode#3025 to allow VSCode extensions to use our official API for monitoring folders for file changes. Out of the box we only watch the folders that are opened in VSCode using Parcel but extension might want to watch folders outside of the opened folders for changes. To better control the overhead of file watching through this API, we would only install recursive file watchers if the extension indicates the need for it and otherwise just watch "flat". We are worried about the overhead of using recursive file watching everywhere, especially since the amount of changes are pretty much unbounded when watching recursively (less likely to be unbounded when watching just 1 hierarchy). Specifically on Linux there is also a limit of open file handles you can have. Recursive file watching on Linux requires a folder handle per folder, so recursive file watching comes at a cost unfortunately. To give an example: the TypeScript extension might have a desire to monitor any folder that is being added to |
In VS Code we have moved to
parcel-bundler/watcher
for most file watching tasks except for non-recursive watching where we still use node.jsfs.watch
. It would be great if we could have an option to disable the recursive watching and only watch:Depending on the OS this would mean:
bWatchSubtree
forReadDirectoryChangesW
The text was updated successfully, but these errors were encountered: