Skip to content
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

Handle MustScanSubDirs for large projects #384

Merged
merged 1 commit into from Apr 27, 2023

Conversation

aleksanb
Copy link
Contributor

When you scan a really large folder for file event changes, the client or kernel might not be able to keep up with all the initial 'add' events sent by fsevents.

This happens for me with our humongous vite project that has thousands of files that are sent to firefox. At some point today, chokidar receives undefined as file type when it's actually a rescan request, and fsevents / chokidar attempts to unlink the directory instead of rescanning it, making vite crash after a while instead of finishing processing fsevents.

This might be a fix in the correct direction, but the maintainers here are probably better at evaluating it. With this patch locally, vite no longer stops working for large projects on initial load.

When you scan a really large folder for file event changes, the client
or kernel might not be able to keep up with all the initial 'add' events
sent by fsevents.

This happens for me with our humongous vite project that has thousands
of files that are sent to firefox. At some point today, chokidar
receives undefined as file type when it's actually a rescan request, and
fsevents / chokidar attempts to unlink the directory instead of
rescanning it, making vite crash after a while instead of finishing
processing fsevents.

This might be a fix in the correct direction, but the maintainers here
are probably better at evaluating it. With this patch locally, vite no
longer stops working for large projects on initial load.
@paulmillr paulmillr merged commit 63709df into fsevents:master Apr 27, 2023
0 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants