Skip to content

Conversation

@tikkss
Copy link
Contributor

@tikkss tikkss commented Jan 8, 2026

GitHub: follow up GH-348

This patch changes from sequential spawn and accept to batch them. Because waiting for each worker process to start one by one was slow.

GitHub: follow up test-unitGH-348

This patch changes from sequential `spawn` and `accept` to batch them.
Because waiting for each worker process to start one by one was slow.
@tikkss
Copy link
Contributor Author

tikkss commented Jan 8, 2026

Co-authored-by: Sutou Kouhei <kou@clear-code.com>
@kou kou merged commit 5545156 into test-unit:master Jan 9, 2026
39 checks passed
@tikkss tikkss deleted the process-runner-improve-performance-on-windows branch January 9, 2026 22:21
@tikkss
Copy link
Contributor Author

tikkss commented Jan 10, 2026

I investigated that elapsed time per processing in Windows CI:
(Note that some processes run in parallel, so the sum of all elapsed times is not equal to the total test execution time)

     collected in main process ┤■■■■■■■■■■■■ 0.683695
             spawned a process ┤■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 1.708945
   collected in worker process ┤■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 1.608906
                      finished ┤■■■■■■■■■■ 0.56229

According to the above investigation, the next bottle neck is collecting test suite in worker process (Spawning processes is the slowest, but it seems to be beyond what we can improve).

In the main process, collecting the test suite takes about 0.6 seconds on Windows and 0.1 seconds on Linux.
In the worker process, collecting the test suite takes about 1.6 seconds on Windows and 0.2 seconds on Linux.

I do not know why there is such a large difference in elapsed time for collecting the test suite between the main process and worker processes only on Windows. I would like to investigate this.

By the way, on Windows, collecting the test suite becomes slower as the number of worker processes increases:

  • 1 worker: 0.6s
  • 2 workers: 0.9s
  • 3 workers: 1.2s
  • 4 workers: 1.6s

On Linux, it stays constant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants