guard / listen

The Listen gem listens to file modifications and notifies you about the changes.
https://rubygems.org/gems/listen
MIT License
1.92k stars 246 forks source link

Use one `fsevent_watch` process per listener instead of one per dir #470

Closed tgxworld closed 4 years ago

tgxworld commented 4 years ago

Related: https://github.com/rails/rails/issues/26158, https://github.com/rails/rails/issues/37269

This is an attempt to resolve the problem of too many fsevent_watch events being spun up on OSX since the number of processes increases with the number of directories being watched.

Screenshot 2019-12-02 at 2 20 28 PM
tgxworld commented 4 years ago

@ioquatix @rymai Can I get your thoughts regarding this before I look into adding the specs? Thank you!

ioquatix commented 4 years ago

Yeah, we should definitely fix this.

coveralls commented 4 years ago

Coverage Status

Coverage decreased (-0.2%) to 97.698% when pulling 6c16cb2ec5132df5f1ac80645e1c4b877ac63d52 on tgxworld:reduce_multiple_fsevent_processes into e8443368472de62275b029dc8ebebd1e43a960bd on guard:master.

coveralls commented 4 years ago

Coverage Status

Coverage decreased (-0.1%) to 97.802% when pulling 56fb99574c4a620ec3fa621ebf023f6943d38fa1 on tgxworld:reduce_multiple_fsevent_processes into e8443368472de62275b029dc8ebebd1e43a960bd on guard:master.

tgxworld commented 4 years ago

@ioquatix Would you mind reviewing this? Thank you so much! 🙇

ioquatix commented 4 years ago

I will review it tonight.

tgxworld commented 4 years ago

Thank you so much 👍

ioquatix commented 4 years ago

Using local branch: https://github.com/guard/listen/pull/471