Skip to content

Find the best path watcher #270

@aminya

Description

@aminya

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions