www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 8f116f60c45dafd6ace14659828f78002f3f2bce
parent 8bc76dd2dbc2282818028e859f76fe7cb5758505
Author: Dan Stillman <dstillman@zotero.org>
Date:   Wed, 24 May 2017 17:59:17 -0400

Increase gulp.watch() interval to decrease CPU usage

This brings idle CPU usage down to 1.5% from 14% for me.

Diffstat:
Mgulpfile.js | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gulpfile.js b/gulpfile.js @@ -132,13 +132,15 @@ gulp.task('sass', () => { gulp.task('build', ['js', 'sass', 'symlink']); gulp.task('dev', ['clean'], () => { - let watcher = gulp.watch(jsGlob); + var interval = 750; + + let watcher = gulp.watch(jsGlob, { interval }); watcher.on('change', function(event) { getJS(event.path); }); - gulp.watch('src/styles/*.scss', ['sass']); + gulp.watch('src/styles/*.scss', { interval }, ['sass']); gulp.start('build'); });