question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Consider replacing chokidar with filespy

See original GitHub issue

Is 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:closed
  • Created 3 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

5reactions
devongovettcommented, Mar 18, 2021

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.

0reactions
aleclarsoncommented, Mar 17, 2021

@dominikg Not a problem with filespy, since each file event provides a fs.Stats object whose isSymbolicLink method can be called to determine if fs.realpath should be used to resolve the symlink (if such behavior is desired).

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found