Options for a large project using Gulp
I'm working on a large nodejs workspaces project. It has thousands of packages. It uses gulp for running tasks, including build, and lerna. The gulpfile.js is importing many large files in the repository (several tens of file, each one several hundred lines of code). The build process is unreasonably slow. It takes tens of seconds to build each package, while some of these packages are really small (maybe hundreds of lines of code). Some are much much larger (tens of thousands LOC), but it seems like the build time is not much different. I want to do something about this. One would be to find the bottleneck in Gulp. Interestingly, I can't find much information about profiling gulp performance. There are many general guidelines, but for a project this large, trial and error is not a good idea. What is a good way to profile gulp and see where is the performance bottleneck. The other would be to migrate to a faster tool like esbuild. But what to do with all these guild tasks? Is there a way to re-use them in esbuild? Any suggestions that would lead to interesting tools, documents, blog posts is highly appreciated.
I'm working on a large nodejs workspaces project. It has thousands of packages. It uses gulp for running tasks, including build, and lerna.
The gulpfile.js
is importing many large files in the repository (several tens of file, each one several hundred lines of code).
The build process is unreasonably slow. It takes tens of seconds to build each package, while some of these packages are really small (maybe hundreds of lines of code). Some are much much larger (tens of thousands LOC), but it seems like the build time is not much different.
I want to do something about this.
One would be to find the bottleneck in Gulp. Interestingly, I can't find much information about profiling gulp performance. There are many general guidelines, but for a project this large, trial and error is not a good idea. What is a good way to profile gulp and see where is the performance bottleneck.
The other would be to migrate to a faster tool like esbuild. But what to do with all these guild tasks? Is there a way to re-use them in esbuild?
Any suggestions that would lead to interesting tools, documents, blog posts is highly appreciated.