-
Notifications
You must be signed in to change notification settings - Fork 357
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
High CPU usage #429
Comments
Same problem here. CPU stays at 50% on my i7 3770. Running on Windows 7. We are probably watching between 500-1000 files. |
I am also experiencing this issue on OSX 10.10.4 with grunt v0.4.5 and grunt-contrib-watch 0.6.1. There are several other issues that seem to be related but apparently the underlying problem has not been fixed: I tried everything mentioned in those issues and nothing helped. Grunt is always using about 70% of my CPU and fseventsd is using about 15%. |
Have to work on few projects (4-5) with grunts running in parallel, CPU usage in total is around 100% all the time .. |
I'm also seeing the same issue on OS X 10.10 with node 4.1.0 and grunt-contrib-watch 0.6.1. |
Same issue here, but watching just 10 files. Grunt is using 100% of the CPU. |
Have you tried this
|
That increases the latency and hurts the instantly responsive illusion. |
I have the same issue with grunt 0.4.5 and grunt-watch 0.6.1 on OSX 10.10.5 |
@partnuz: this worked for me |
Same problem with grunt 0.4.5 and grunt-watch 0.6.1 windows 7, watching 12 files, 100% CPU usage when editing files |
hurts the instantly responsive illusion, but using a lower number, as Good workaround until we figure something else. |
Switching to https://github.com/JimRobs/grunt-chokidar (forked off of @shama @tkellen Would you consider a pull request to switch the underlying lib from |
@callmevlad see #314 |
@vladikoff Thanks for the link! That issue is from a few years ago, and seems to make claims about Gaze >= 0.6 that don't seem to be true today at 1.0.0 (like not using native OS events instead of polling, for example), so I was hoping that decision would be revisited. It would be great to get @shama's thoughts around which changes in jimmy-robert@a0f15e7 are incompatible two years later, or at least start a discussion around why |
@callmevlad I'm not against revisiting |
Hey guys! Any idea why it doesn't work ? Below you can see my Gruntfile.js
|
@vasilii-b grunt.option() is an interface for command line options. So
Unfortunately your above Gruntfile is hiding the config so I'm not sure where that custom Gruntfile implementation expects watch task options. Typically with Gruntfiles, we recommend being explicit with the config: grunt.initConfig({
watch: {
options: {
// Options for the watch task go here
interval: 5000
},
stuff: {
files: ['src/*.js'],
tasks: ['concat']
}
}
}); |
This has been bothering me for a while and I finally decided to look around today (my fan was constantly on). I tried the above mentioned I'm on Linux if that makes a difference. Based on this it seems like it works well on a Mac as well. |
We ended up switching away from |
Any activity planned on this one? Watch is still a problem. Grunt-chokidar solves it but is unmaintained and has few cosmetic issues. |
I'm surprised this issue hasn't gotten more attention. Tons of web developers are at coffee shops with no power and here grunt-watch-contrib is eating up battery. FWIW chokidar is pretty horrible on Windows and as proof VSCode stopped using it years ago on windows and wrote their own. The do use chokidar on Linux and Mac or did last time I checked. For Windows they wrote some small C# program and read its streamed output https://github.com/microsoft/vscode/tree/master/src/vs/platform/files/node/watcher/win32 |
I'm still experiencing this on grunt-contrib-watch version 1.1.0 |
So it's almost 9 years now since the issue have been reported. Any progress on this? Is this repo still alive? |
Okay, just use nodemon and let this repo die silently. |
Hi,
Grunt Watch consumes about 65-70% CPU Resources.
my devDependencies are as follows.
my gruntfile:
The text was updated successfully, but these errors were encountered: