Skip to content

Run tests in parallel by default - #22939

Merged
arnaud-lb merged 10 commits into
php:masterfrom
NickSdot:perf/parallel-by-default
Aug 10, 2026
Merged

Run tests in parallel by default#22939
arnaud-lb merged 10 commits into
php:masterfrom
NickSdot:perf/parallel-by-default

Conversation

@NickSdot

@NickSdot NickSdot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Extracted from #22917.

Runs the test suite in parallel by default; automatically selects up to 10 workers. Explicit -j1 remains the opt-out to run tests serial. Smaller batches improve balancing.

Intended to merge after #22957 so eligible Windows test subprocesses no longer use the shell wrapper when parallel execution becomes the default.

Result

Values in seconds; measured on macOS.

mode master this PR saved speedup
(none) 2223.224 408.009 1815.215 5.45×

Reproduction:

sapi/cli/php run-tests.php -q

Ref: 9b36b91 (review comments)
cc @arnaud-lb

@LamentXU123

Copy link
Copy Markdown
Member

Not an expert in conflicts file. Should cc @bukka in this.

@LamentXU123
LamentXU123 removed their request for review July 30, 2026 12:36
@NickSdot

Copy link
Copy Markdown
Contributor Author

Not an expert in conflicts file. Should cc @bukka in this.

FWIW, the doc change is only a clarification because after this tests run in parallel by default. This PR has no changes to CONFLICTS itself. 🫡

@NickSdot
NickSdot marked this pull request as draft July 30, 2026 13:24

@arnaud-lb arnaud-lb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me otherwise, but I will wait for other reviews

Comment thread tests/run-test/automatic_worker_limit.phpt Outdated
Comment thread run-tests.php
Comment thread run-tests.php Outdated
Comment thread run-tests.php Outdated
@NickSdot
NickSdot marked this pull request as ready for review July 31, 2026 06:34

@arnaud-lb arnaud-lb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me otherwise!

I will wait a few days and merge if there are no objections.

Comment thread run-tests.php Outdated
Comment thread run-tests.php Outdated
Comment thread run-tests.php Outdated
@NickSdot NickSdot mentioned this pull request Jul 31, 2026
@NickSdot
NickSdot force-pushed the perf/parallel-by-default branch from 9e8de6b to 5a874af Compare August 3, 2026 20:28
@NickSdot

NickSdot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

Looks good to me otherwise!

I will wait a few days and merge if there are no objections.

Friendly reminder, @arnaud-lb. 🫡

If this is merged #22995 would have a slight change. The same is true for #22946, so if you would merge here it would be nice if you could look at the Windows one-liner along with it. I plan to later today push the update for the CI PR.

Monday is a good day to merge, isn't it? 🤓 Will be around to have an eye on CI in case anything unexpected happens!

Edit: does this need a NEWS or INTERNALS entry?

@arnaud-lb

Copy link
Copy Markdown
Member

Yes, this is worth a NEWS and INTERNALS entry. Please add them, and I will merge :)

@NickSdot

Copy link
Copy Markdown
Contributor Author

Yes, this is worth a NEWS and INTERNALS entry. Please add them, and I will merge :)

That's done! 🫡

@arnaud-lb
arnaud-lb merged commit 1d2ea5c into php:master Aug 10, 2026
1 check passed
@arnaud-lb

Copy link
Copy Markdown
Member

Thank you!

@NickSdot
NickSdot deleted the perf/parallel-by-default branch August 10, 2026 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants