Built/Test Tools: Increase grunt watch interval on all files.

Significantly reduces Grunt's CPU usage when `grunt watch` is in an idle/watching state.

Props netweb.
Fixes #44241.


git-svn-id: https://develop.svn.wordpress.org/trunk@43324 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jeremy Felt 2018-05-27 18:46:15 +00:00
parent 247eba769e
commit 532d177b65

View File

@ -1029,6 +1029,9 @@ module.exports = function(grunt) {
} }
}, },
_watch: { _watch: {
options: {
interval: 2000
},
all: { all: {
files: [ files: [
SOURCE_DIR + '**', SOURCE_DIR + '**',
@ -1039,8 +1042,7 @@ module.exports = function(grunt) {
tasks: ['clean:dynamic', 'copy:dynamic'], tasks: ['clean:dynamic', 'copy:dynamic'],
options: { options: {
dot: true, dot: true,
spawn: false, spawn: false
interval: 2000
} }
}, },
'js-enqueues': { 'js-enqueues': {
@ -1048,8 +1050,7 @@ module.exports = function(grunt) {
tasks: ['clean:dynamic', 'copy:dynamic-js', 'uglify:dynamic', 'jsvalidate:dynamic'], tasks: ['clean:dynamic', 'copy:dynamic-js', 'uglify:dynamic', 'jsvalidate:dynamic'],
options: { options: {
dot: true, dot: true,
spawn: false, spawn: false
interval: 2000
} }
}, },
'js-webpack': { 'js-webpack': {
@ -1061,8 +1062,7 @@ module.exports = function(grunt) {
tasks: ['clean:dynamic', 'webpack:dev', 'uglify:dynamic', 'jsvalidate:dynamic'], tasks: ['clean:dynamic', 'webpack:dev', 'uglify:dynamic', 'jsvalidate:dynamic'],
options: { options: {
dot: true, dot: true,
spawn: false, spawn: false
interval: 2000
} }
}, },
config: { config: {
@ -1083,8 +1083,7 @@ module.exports = function(grunt) {
], ],
tasks: ['rtlcss:dynamic'], tasks: ['rtlcss:dynamic'],
options: { options: {
spawn: false, spawn: false
interval: 2000
} }
}, },
test: { test: {