Skip to content

Commit cea6b6c

Browse files
committed
Improved grunt express/casper watchers
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
1 parent 7d6436f commit cea6b6c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Gruntfile.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ const configureGrunt = function (grunt) {
7070
'content/themes/casper/assets/js/*.js'
7171
],
7272
options: {
73-
livereload: true
73+
livereload: true,
74+
interval: 500
7475
}
7576
},
7677
express: {
@@ -84,7 +85,8 @@ const configureGrunt = function (grunt) {
8485
tasks: ['express:dev'],
8586
options: {
8687
spawn: false,
87-
livereload: true
88+
livereload: true,
89+
interval: 500
8890
}
8991
}
9092
},

0 commit comments

Comments
 (0)