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

Find the best path watcher #270

Open
aminya opened this issue Apr 28, 2021 · 0 comments · Fixed by #272
Open

Find the best path watcher #270

aminya opened this issue Apr 28, 2021 · 0 comments · Fixed by #272

Comments

@aminya
Copy link
Member

aminya commented Apr 28, 2021

Pathwatchers

Previously we used Atom's path watcher, however, Atom's Pathwatcher is non-recursive, has issues, and lacks a maintainer to address these
atom/node-pathwatcher#135

We switched to chokidar in the recent versions. However, I am still experimenting with chokidar. It is convenient, but not necessarily the fastest. Not sure if it is the best solution for tracking the changes in the path cache. I have noticed some slowdowns in the large projects like this one

I think nsfw is a very good candidate. I have made a pull request for adding prebuilds. When that one is merged, I will switch to nsfw.

We could also use fb-watchman, which is a native package. I think it has a better performance compared to chokidar and atom/pathwatcher

Should we even use a path watcher?

One optimization to perform is to maybe give up tracking the changes if the number of files is larger than some amount.

Another solution is to add event listeners to Atom's file/folder adding/removing. So, only if the user adds/remove a file/folder inside Atom itself (using TreeView for example), then we consider that as a change in our path cache.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant