Skip to content

super_errors: run fixtures in parallel#8430

Open
JonoPrest wants to merge 3 commits into
rescript-lang:masterfrom
JonoPrest:jono/parallelize-super-error-runner
Open

super_errors: run fixtures in parallel#8430
JonoPrest wants to merge 3 commits into
rescript-lang:masterfrom
JonoPrest:jono/parallelize-super-error-runner

Conversation

@JonoPrest
Copy link
Copy Markdown
Contributor

Each fixture spawns a bsc process and the previous for ... await loop ran them sequentially, so wall time scaled linearly with fixture count. Replace with a fixed-size worker pool (os.availableParallelism() workers) and sort the fixture list for deterministic failure output.

Locally on 264 fixtures this cuts the suite from ~2.2s to ~0.9s (~2.4x). The original 2019 implementation was also parallel; the sequential loop was a side-effect of the ESM/async-await refactor in #6899, which explicitly noted it wasn't refactoring tests.

Each fixture spawns a `bsc` process and the previous `for ... await`
loop ran them sequentially, so wall time scaled linearly with fixture
count. Replace with a fixed-size worker pool (`os.availableParallelism()`
workers) and sort the fixture list for deterministic failure output.

Locally on 264 fixtures this cuts the suite from ~2.2s to ~0.9s
(~2.4x). The original 2019 implementation was also parallel; the
sequential loop was a side-effect of the ESM/async-await refactor
in rescript-lang#6899, which explicitly noted it wasn't refactoring tests.
@JonoPrest JonoPrest requested a review from cknitt May 18, 2026 14:00
@JonoPrest
Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Breezy!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 19, 2026

Open in StackBlitz

rescript

npm i https://pkg.pr.new/rescript@8430

@rescript/darwin-arm64

npm i https://pkg.pr.new/@rescript/darwin-arm64@8430

@rescript/darwin-x64

npm i https://pkg.pr.new/@rescript/darwin-x64@8430

@rescript/linux-arm64

npm i https://pkg.pr.new/@rescript/linux-arm64@8430

@rescript/linux-x64

npm i https://pkg.pr.new/@rescript/linux-x64@8430

@rescript/runtime

npm i https://pkg.pr.new/@rescript/runtime@8430

@rescript/win32-x64

npm i https://pkg.pr.new/@rescript/win32-x64@8430

commit: 2d44c26

Copy link
Copy Markdown
Member

@cknitt cknitt left a comment

Choose a reason for hiding this comment

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

Awesome!

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