What concurrency limit should Gulp apply by default to prevent latency spikes during large file operations?
0 reputation · 19 Sept 2020, 07:27 UTC
The goal is to understand whether Gulp’s core should automatically throttle parallel task execution to avoid latency spikes when many tasks perform heavy I/O, such as copying large files or running image optimizations.
Currently Gulp 4 relies on the orchestrator library and Node.js’s asynchronous I/O, which starts all tasks declared with gulp.parallel simultaneously. While this works well for lightweight streams, concurrent heavy‑file operations can saturate the disk and libuv thread pool, causing observable delays. The community has noted that built‑in throttling is absent, leaving users to adopt third‑party plugins or custom semaphores.
Should Gulp core provide a built‑in concurrency governor? If so, what default limit would balance throughput and latency? How could users override it per‑task or per‑build?