Gulp new files are processed slower every time?

Hello!
Use gulp4.
There is a problem that when I add a new file, it is processed slowly and the task execution time associated with it, increases with each save.
At the same time, all other files that were before the start of the gulp tasks are working properly.

Watcher:
gulp.task('watch', function() {
 gulp.watch([`${path.styles}/style.css`, `${path.styles}/utils/**/*.css`, `${path.styles}/base/**/*.css`, `${path.blocks}/**/*.css`], gulp.series('css'));
 gulp.watch([`${path.dev}/*.html`, `${path.styles}/style.compiled.css`, `${path.scripts}/app.compiled.js`]).on('change', browserSync.reload);
});


Task handler:
gulp.task('css', function() {
 return gulp.src([`${path.styles}/style.css`])
 .pipe(postcss(plugins, { parser: sugarss })).on('error', log)
.pipe(rename({
 suffix: '.compiled',
 extname: '.css'
}))
 .pipe(csso()).on('error', log)
.pipe(gulp.dest(path.styles))
});


Tusk launch:
gulp.task('default', gulp.series( 'css', gulp.parallel('server-dev', 'watch')));


If you have any ideas, what can you do, I would be very grateful.
July 9th 19 at 13:51
1 answer
July 9th 19 at 13:53
Solution
Managed to solve it. The problem was that in 4 golpe way to watch it is necessary to write differently, without ./
gulp.task('watch', function(done) {
 gulp.watch(['**/*.css', '!dev/styles/style.compiled.css'], gulp.series('css'));
 gulp.watch([`${path.dev}/*.html`, `${path.styles}/style.compiled.css`, `${path.scripts}/app.compiled.js`]).on('change', browserSync.reload);

done();
});


I added corbaci to the server and watch, but I'm not sure they are needed. Work, touch has no power.
gulp.task('server-dev', function(done) {
browserSync.init({
 server: {
 baseDir: path.dev
},
 port: 8000,
 https: false
 notify: false,
 reloadDelay: 50
 }, done);
});
I have the same problem but the path is spelled correctly... you have never observed? - antonia_Wintheiser80 commented on July 9th 19 at 13:56

Find more questions by tags Gulp.js