In #791, we added a flag to control the concurrency. It turned out operating systems are really bad at doing their job properly, and they couldn't handle the amount of processes we tried to start up when there's a lot of test files. We also have the overhead starting up node and requiring dependencies in each process. This was a big problem in React projects where you do one test file per component, and you usually have a lot of components.
We should consider doing a default concurrency limit. Users should still be able to set it to unlimited, but I think it would be in our best interest to adapt to reality. I've previously had good success with (os.cpus().length || 1) * 2, but we should get some real numbers on it from various systems.
Everyone, please run your test suite with the --concurrency flag and try out different numbers for it and post back the results. Also include the number of test files in the suite and the output of:
Edit: Let's wait on this until #945 is merged and released, per #966 (comment).
node -p "require('os').cpus().length"
@avajs/core Thoughts?
In #791, we added a flag to control the concurrency. It turned out operating systems are really bad at doing their job properly, and they couldn't handle the amount of processes we tried to start up when there's a lot of test files. We also have the overhead starting up
nodeand requiring dependencies in each process. This was a big problem in React projects where you do one test file per component, and you usually have a lot of components.We should consider doing a default concurrency limit. Users should still be able to set it to unlimited, but I think it would be in our best interest to adapt to reality. I've previously had good success with
(os.cpus().length || 1) * 2, but we should get some real numbers on it from various systems.Everyone, please run your test suite with the--concurrencyflag and try out different numbers for it and post back the results. Also include the number of test files in the suite and the output of:Edit: Let's wait on this until #945 is merged and released, per #966 (comment).
@avajs/core Thoughts?