-
Notifications
You must be signed in to change notification settings - Fork 17.4k
Back filesystem watchers with @atom/watcher #16124
Conversation
779fbcc
to
b2ec006
Compare
/cc @ungb I'd ❤️ your input on the test plan in the PR description once you're back in the office 😄 In particular, I have no idea what kinds of network drives we should test, or, like, how we should do that. NFS? Samba? sshfs... ? /cc @rsese @lee-dohm @50Wliu in case any of you have seen any other filesystem-related issues fly by recently that we should verify this doesn't regress. /cc @Arcanemagus who has been helping a bunch with the @atom/watcher work. 🙇 You're welcome to check this out in Atom proper, although unfortunately I don't think your NAS will work yet (I haven't done anything to get it out of the "silently deliver no events" category.) |
@smashwilson I feel like for network support we should test:
in that priority order. Also, we should test them through a connection with restricted network throughput and latency generator to see what the limits are for our implementation. (In other words, will sshfs over a high-latency 3G cellular connection work as expected?) |
8162b34
to
f9e7972
Compare
I'll try to run through flash drive and cloning a large git repository on Windows soon. |
86032d1
to
967100b
Compare
bc18260
to
8e93675
Compare
153b16d
to
f94095d
Compare
715fb17
to
106b0b2
Compare
281b6d8
to
fc320f1
Compare
f28e6f6
to
1e849ed
Compare
3669878
to
183705e
Compare
0b19003
to
219783f
Compare
Got around to checking the scenarios I mentioned above and everything seems all right 👍. Decent performance, no crashes or anything. |
13ace99
to
9fa2d6d
Compare
✨ Excellent, thank you! You're on Windows, right? |
On reflection I'm likely going to punt on atom/watcher#70 until after this is merged. It isn't entirely clear to me what the right thing to do is there, and I don't want to hold this up when a better solution might not involve @atom/watcher at all. What's more, nsfw also doesn't handle this well, so we're no worse off than what's currently shipped. I would like to tackle atom/watcher#19 though. @ungb: Do we have a samba share or an sshfs mount already available somewhere that we could use for network drive tests? It might be nice to have those available for general testing in any case 🤔 |
Yep. |
... I can read, really |
@smashwilson we do have something for sshfs, let me look into samba share. |
c0a3514
to
1032f54
Compare
6f4289a
to
3622fb5
Compare
I saw a crash when you disconnect a Samba share on Windows while it contains a watched directory. Tracking it in atom/watcher#118. |
3622fb5
to
73d8471
Compare
I just wanted to chime in by saying I recently added github functionality to my atom version, and the default filesystem watcher was constantly at around 5% when i was working on small tasks. looking forward to this experimental file system watcher and i hope the cpu util will go down! thanks for the effort. |
Add a new "experimental" setting for
core.fileSystemWatcher
that backs watchPath with @atom/watcher. There should be no changes for API consumers.Remaining Work
These are known issues in @atom/watcher that I'd like to address before this merges. Mostly, these avoid regressing on some edge cases that have been reported with the current watcher.
Features and Limitations
In its current state, the experimental watcher:
ReadDirectoryChangesW()
reports that a directory does not support watching on Windows; or (c) the maximum number of inotify watch descriptors is exceeded on Linux.It cannot currently:
Test Plan
Before we merge, I'd like to verify that we handle or fail gracefully in a number of trickier situations. In each scenario, if we:
These are some of the cases I've thought to try:
To Opt In
If you want to give this a try before it merges, clone and build Atom from this branch:
git clone https://github.com/atom/atom.git --branch aw-watcher cd atom script/build --install
Launch Atom and set
core.fileSystemWatcher
to "experimental" in your core settings.