-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
perf: allow using @parcel/watcher
for dev watcher
#20179
Conversation
Nice idea trying this. Some notes Checking pkg contents it seems being shipped with whole binaries in the It seems only ships with a CJS build, no fsevents used in other packages including rollup and nitro is also already there so it might be worth more if being a synced change move. |
This is to allows to build from source if prebuilds does not match OS arch I guess |
Yes, and that's not exactly the best way to distribute a binary... |
I agree. May not be the best solution to introduce gyp dependent packages (may be this a good candidate for unjs?). After making some tests on internal repo (with nuxi change reverted), using this branch instead of chokidar drop watcher to be ready from ~30s to 300ms. This also impact global nitro/vite startup time Using
Using this branch:
|
Nice for benchmarks! Are the above results on windows? I'm curious about linux/macos impact too. We can make a similar watcher util with |
Yes, win 11 with wsl2 (out of DrvFS) |
wsl2 is linux kernel... (actually depends on the test path. testing watch perf on a linux storage vs windows mounts differs) |
I would suggest raising an issue with |
The js wrapper is super small. The main concerns I mentioned earlier require significant changes in the package distribution for binaries, which is probably hard to progress on a package already in use and much faster to try a small rebuild :) |
I've found this commit in vite from 2 weeks ago that seem to be related: vitejs/vite@24b91d5 chokidar is used for |
@parcel/watcher
@parcel/watcher
for dev watcher
Hello, tested on windows 10 machine (not wsl) with small to medium project Chokidar (1 ... 5 runs):
@parcel/watcher:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Only would be nice to make flag as experimental.newWatcher
so that we can change experiment to different providers without introducing additional flags.
Good idea! |
Whoooo, that's absolutely game changer! Here the project, it's a Nuxt Layer https://github.com/Classement-des-Associations/website-theme and I'm developing on Windows. With Parcel, that's fast (like a normal nuxt project) With Chokidar, that was unusable. |
β Type of change
π Description
This is an experimental PR swapping out chokidar for
@parcel/watcher
for testing on Windows and other OSes for performance improvements. See #20176 for some context.@parcel/watcher
supports Watchman for significant perf improvements when watching large file trees and is used under the hood by VSCode.π Checklist