Consider replacing chokidar with filespy
See original GitHub issueIs your feature request related to a problem? Please describe.
Vite could take advantage of Watchman when installed and the other benefits of using filespy, like event throttling, native performance (powered by @parcel/watcher
), and more.
Disclaimer: I haven’t compared chokidar
and filespy
in a benchmark yet. Should probably do that.
Describe the solution you’d like
Replace chokidar
with filespy
.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Renaming directory is reported only as addition (no unlink ...
Chokidar doesn't report unlink nor unlinkDir events for the now non-existing ... Consider replacing chokidar with filespy vitejs/vite#2547.
Read more >chokidar - npm
Start using chokidar in your project by running `npm i chokidar`. ... If polling leads to high CPU utilization, consider setting this to ......
Read more >System Tools - FileSpy - Ladislav Zezula
The FileSpy is a GUI application for the FSpy.sys or MSpy.sys, a monitoring filter driver shipped with the WDK. Its functionality is similar...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Since I was tagged… we replaced Chokidar in Parcel mainly because we ran into a lot of issues with it especially when building large projects, both on macOS and linux. Mainly this was due to running out of file descriptors due to watching individual files, and the slow crawl over the whole filesystem that chokidar does on startup. In addition, there were stability issues where the watcher would simply stop working after a while. This could have improved in the last couple years though, not sure.
That said, the main reason we wrote our own module wasn’t actually for watching but for caching. Parcel’s watcher can be used to efficiently detect changes in files even after a restart, which makes it work almost like watch mode after a restart. Not sure if this is a problem vite has though.
@dominikg Not a problem with
filespy
, since each file event provides afs.Stats
object whoseisSymbolicLink
method can be called to determine iffs.realpath
should be used to resolve the symlink (if such behavior is desired).