-
Notifications
You must be signed in to change notification settings - Fork 330
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
karma: extras: usePolling #297
Comments
Okay, so it seems that on macOS, https://github.com/karma-runner/karma/blob/master/lib/config.js#L318 tracking it back with blame: That commit was about 3 1/2 years ago, and it seems that non-polling file watching on macOS works fine now, i.e. since I set |
Filed an issue yesterday with karma-runner/karma: |
@michaelsbradleyjr Wow, nice discovery. I hope it becomes default in upstream karma 👍 . Would you mind updating the docs on the master branch? I'll be sure to merge it in asap. |
What do you think is the best approach? Should I include a note under the |
Under the karma intro paragraph with a "Note:" prefix, would be great. Thanks for getting confirmation |
See #298. |
Resolved by #298 |
This issue is a:
When making use of nwb's
npm run test:watch
, on macOS Sierra (10.12.4), node v7.9.0, I was getting very high CPU usage even when the node process was idle, i.e. just waiting to be triggered by a change to a source or test file.I spent several hours trying to figure out what was happening. This helped:
sudo fs_usage -f pathname -w
Thousands of files were getting polled in
node_modules
, relative to my project's top-level directory. I tried to figure out whether it was karma or webpack, or both, and whether I could tell either or both to excludenode_modules
....... long story short, nothing I changed in theextra:
fields for karma and webpack, innwb.config.js
, was having any significant effect.Later, while digging around in some GitHub issues, I saw where one can set
usePolling: false
in one's karma config (that options seems not well documented)So, in
nwb.config.js
:Finally, that worked. Now, the node process for
npm run test:watch
sits idle at ~0% cpu usage, which is what one would expect, i.e. when it's not busy compiling or running tests.I'm filing this issue since it may be helpful to others, and perhaps warrants a note in nwb's configuration documentation.
The text was updated successfully, but these errors were encountered: