Skip to content

add explanation of chokidar's resource consumption#126

Open
fotoflo wants to merge 1 commit intoQard:masterfrom
fotoflo:readme-resource-consumption-explainer
Open

add explanation of chokidar's resource consumption#126
fotoflo wants to merge 1 commit intoQard:masterfrom
fotoflo:readme-resource-consumption-explainer

Conversation

@fotoflo
Copy link
Copy Markdown

@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
Copy Markdown
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