gulp-watch: Slowness with v4 vs. v3

Hi there. I am using this plugin alongside gulp-livereload like so:

gulp.task "watch", ->
  plugins.livereload.listen()

  plugins.watch "#{config.sourcePath}/#{config.cssDirectory}/**/*.styl", ->
    gulp.start "stylesheets"

  plugins.watch "#{config.publicPath}/**/*"
    .pipe plugins.livereload()

  return

With version 3.0.0, CSS updates were instant. With v4.1.0, however, a few seconds go by before the browser refreshes… and it is somewhat inconsistent (sometimes 1 second, sometimes up to 10).

Any ideas what’s up?

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 28 (11 by maintainers)

Most upvoted comments

So, it’s been more than a year since the last update in this thread. I’m now working on another project, with another Node version; the problems are way smaller, but still noticeable when compared to the gulp’s built-in gulp.watch function.

The execution times are growing in a slower pace than what it used to be, it takes like 10 saves of 1 byte to increase 5x the initial execution time; however, this is still annoying.

Here’s a gist that replicates my issues on Windows 10: https://gist.github.com/gustavohenke/3381d0e2de51f0c95438ba499f5a2c04