S
S
Sergiu Mitu2017-06-03 16:56:17
css
Sergiu Mitu, 2017-06-03 16:56:17

Why does gulp run tasks more slowly as it runs?

Actually, the question is why gulp.js performs the same task more and more slowly as it works.
An example of a task execution in a GIF (sorry if the scroll is too fast) 70834d5ba03c441e817b1e6150b03a46.gif
Attention to the "styles:dev" task, at first it runs in less than a second, after two hours the execution time increased to 9s, why? the files themselves that it processes do not change much. And if you just exit the execution of the 'watch' task that automates this whole thing, and start it over again, the execution time becomes normal, fast (up to a second), and again over a new one after two hours already 6-9 seconds.
here are the tasks from gulpfile.js

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergiu Mitu, 2017-06-15
@EaGames

The problem turned out to be in the watch task, namely watch on html files.
I chose html files for tracking like this: 'src/**/*.html'
It turned out that you can't specify that, xs why. Changed in my case to ['src/*.html', 'src/templates/*.html'], now everything is fine.
To be honest, I didn’t understand what kind of magic, and I’m unlikely to understand, if anyone knows why, I’ll be grateful.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question