npm-run-all icon indicating copy to clipboard operation
npm-run-all copied to clipboard

[Question] performance between flat npm-run-all -p vs nested npm-run-all -p

Open dereklin opened this issue 6 years ago • 1 comments

I was wondering if there were any comparison done for performance between flat npm-run-all -p vs nested npm-run-all -p.

Let's say I have 100 tasks/commands.

I can do npm-run-all -p all-100-tasks...

or I can group the 100 tasks into 10 groups/scripts with each one running npm-run-all -p 10-tasks... and then run

npm-run-all -p the-10-grouped-scripts...

Is there any difference in terms of performance?

How about when 100 tasks becomes 1,000 or 10,000 tasks?

dereklin avatar Jan 21 '19 17:01 dereklin

Thank you for this issue.

I have not tried such a many tasks. In general, npm-run-all spawns npm run-script xxx process and the spawned npm run-script xxx process spawns a sh process with the script body of xxx. That means there are 3 processes at least for each task. I don't think if that has good performance.

mysticatea avatar Jan 22 '19 04:01 mysticatea