-
Notifications
You must be signed in to change notification settings - Fork 356
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
node cpu when watch #145
Comments
It's likely because of the low |
Oh yeah and see #35 for related issue. |
Yeah I need to figure out a happy medium. It seems more files watched needs a higher interval. I guess until Grunt is node |
Okay thank you ;) I can now close the ticket so. Maybe you should specify it in the readme for the moment until it's ok. |
@shama - can you expand on how node >= 0.10 would impact this issue? |
@mattkime Well I can't confirm anything besides I notice a lot less watch issues with 0.10, especially with OSX. Although 0.10 uses fsevents on osx for directories which should reduce CPU usage. See this issue: shama/gaze#5. I think most of the CPU usage now comes from the polling. Unfortunately we can't just not use polling as it breaks a number of existing tests cases that we would like to continue to support. Also users will likely hit So we're trying to balance between working around known issues and speed/cpu usage. The less issues there are upstream the more efficient we can make the watch operate here. 0.10 has less issues. |
closes TryGhost#9718 - fs.fileWatch that is used internally by 'gase' in 'grunt-contrib-watch', is having 100ms pooling default (https://github.com/shama/gaze/blob/07828a684566b6d4844f12b747e74e376fa31744/lib/gaze.js#L36). This is causing hight CPU usage for large amount of files. - As suggested in https://github.com/gruntjs/grunt-contrib-watch#why-is-the-watch-devouring-all-my-memorycpu the watch interval was set to higher 500ms because the recommended default of 5s (gruntjs/grunt-contrib-watch#145 (comment)) was visible in the development flow
When watching, node takes a lots of cpu, it's maybe normal but quite frightening
My config:
Can I reduce the cpu taking? or could we optimise that?
The text was updated successfully, but these errors were encountered: