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

add explanation of chokidar's resource consumption #126

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fotoflo
Copy link

@fotoflo fotoflo commented May 7, 2022

What: Add explanation of resource consumption to readme.md

Why: This is likely a primary concern of all developers. Certainly I wanted to know how it worked and what resources it would consume before adding it to my project.

Detail:

Resource Consumption

onchange is based on chokidar a "Minimal and efficient cross-platform file watching library"

"On MacOS, chokidar by default uses a native extension exposing the Darwin FSEvents API. This provides very efficient recursive watching compared with implementations like kqueue available on most *nix platforms. Chokidar still does have to do some work to normalize the events received that way as well."

"On most other platforms, the fs.watch-based implementation is the default, which avoids polling and keeps CPU usage down. Be advised that chokidar will initiate watchers recursively for everything within scope of the paths that have been specified, so be judicious about not wasting system resources by watching much more than needed."

@blakeembrey
Copy link
Collaborator

Can you move this to the end of the README? I don't think people need this information as the primary concern. Most likely how to use it is more of a concern.

Also, if you're trying to quote things you can use block quotes in markdown to make that clearer. I'd also copy it over with the same formatting. The code blocks have been removed. Or just link to it instead of copying at all.

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

Successfully merging this pull request may close these issues.

2 participants