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

[CLOSED] Use a filewatcher library #10477

Open
core-ai-bot opened this issue Aug 30, 2021 · 12 comments
Open

[CLOSED] Use a filewatcher library #10477

core-ai-bot opened this issue Aug 30, 2021 · 12 comments

Comments

@core-ai-bot
Copy link
Member

Issue by ficristo
Tuesday Feb 02, 2016 at 10:37 GMT
Originally opened as adobe/brackets#12187


Right now we use an outdated version of fsevents and fsevents_win to watch files.
I think using a library better maintained would be a nice alternative option.
I tried once to use chokidar but I've had some performance problem: maybe because it watches file recursively and Brackets doesn't. I don't know.
Another library could be https://github.com/facebook/watchman/tree/master/node

@core-ai-bot
Copy link
Member Author

Comment by ficristo
Wednesday Feb 03, 2016 at 13:42 GMT


Or this https://github.com/amasad/sane that can use watchman under the hood but it's not necessary.

@core-ai-bot
Copy link
Member Author

Comment by petetnt
Wednesday Feb 03, 2016 at 14:16 GMT


Gaze is (yet another) option: https://github.com/shama/gaze (used by grunt-contrib-watch for example)

@core-ai-bot
Copy link
Member Author

Comment by MiguelCastillo
Wednesday Feb 03, 2016 at 14:51 GMT


I haven't done much research on this in a few months, but this https://github.com/paulmillr/chokidar was the better library I have seen around. It is used by watchify (browserify's watching plugin).

@core-ai-bot
Copy link
Member Author

Comment by MiguelCastillo
Wednesday Feb 03, 2016 at 14:53 GMT


@ficristo I have not noticed performance issues... But perhaps that's due to the fact that it is part of build process where it is really hard to see where performance is lost. How did you go about testing this performance issues you saw? Can you share you test setup so that I can run them? I am really curious :)

@core-ai-bot
Copy link
Member Author

Comment by MiguelCastillo
Wednesday Feb 03, 2016 at 15:29 GMT


@ficristo is the motivation purely about switching to a more actively maintained library? Curious to know if there are issues that you are trying to solve.

@core-ai-bot
Copy link
Member Author

Comment by ficristo
Wednesday Feb 03, 2016 at 15:45 GMT


No, there aren't specific problems.
I only think using up to date library is (almost) always a plus.

@core-ai-bot
Copy link
Member Author

Comment by MiguelCastillo
Wednesday Feb 03, 2016 at 16:52 GMT


@ficristo sounds good to me. this will require quite a bit testing; you got different platforms that behave differently. If my memory serves me right,@peterflynn was one of the main dev involved in the current implementation. Perhaps he could chime in when he gets a sec.

You mentioned a really key point. chokidar will recursively add watchers and brackets does not. This is concerning. :)

Curious to know how does this works in Ubuntu... Have you tried it?

@core-ai-bot
Copy link
Member Author

Comment by ficristo
Wednesday Feb 03, 2016 at 18:21 GMT


No, I didn't. I'm not really Linux friendly...

@core-ai-bot
Copy link
Member Author

Comment by MiguelCastillo
Saturday Feb 13, 2016 at 15:04 GMT


Let's continue further discussion in the actual PR adobe/brackets#12190 (comment).

@core-ai-bot
Copy link
Member Author

Comment by ficristo
Sunday Feb 14, 2016 at 18:16 GMT


Another couple of interesting libs.
https://github.com/atom/node-pathwatcher
https://github.com/bevry/watchr

@core-ai-bot
Copy link
Member Author

Comment by ficristo
Wednesday Aug 17, 2016 at 07:38 GMT


This PR adobe/brackets#12647 is now using chokidar.

@core-ai-bot
Copy link
Member Author

Comment by ficristo
Saturday Oct 01, 2016 at 09:26 GMT


Now that #12647 has merged we are using https://github.com/Microsoft/vscode-filewatcher-windows on Windows and https://github.com/paulmillr/chokidar on Linux and macOS.

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

No branches or pull requests

1 participant