stacks-archive / blockstack-browser

The Blockstack Browser
Mozilla Public License 2.0
1.12k stars 199 forks source link

Gulp dev uses large amount of CPU time #134

Closed larrysalibra closed 7 years ago

larrysalibra commented 7 years ago

Running gulp dev uses 70-100% of a cpu core continuously. Makes it difficult to develop on battery power.

screen shot 2016-12-21 at 11 03 33 pm

Increasing watch interval to 2000ms didn't seem to have any effect.

gulp.task('watch', ['browserSync'], function() {

  // Scripts are automatically watched by Watchify inside Browserify task
  gulp.watch(config.styles.src, { interval: 2000 }, ['copyStyles']);
  gulp.watch(config.styles.src, { interval: 2000 }, ['sass']);
  gulp.watch(config.images.src, { interval: 2000 }, ['imagemin']);
  gulp.watch(config.sourceDir + 'index.html', { interval: 2000 }, ['copyIndex']);

});

This thread suggests reducing the number of files that are watched:

https://github.com/BrowserSync/browser-sync/issues/404

larrysalibra commented 7 years ago

I can't replicate this on my machine anymore. Gulp only uses ~2-3% of one cpu core when it's not rebundling. Please re-open if you can replicate or if the issue reoccurs.