Skip to content

perf(tests): Improve local unit test performance - #4112

Open
janbuchar wants to merge 3 commits into
masterfrom
improve-test-performance
Open

perf(tests): Improve local unit test performance#4112
janbuchar wants to merge 3 commits into
masterfrom
improve-test-performance

Conversation

@janbuchar

Copy link
Copy Markdown
Contributor
  • pnpm test now runs two vitest projects — unit, then browser for the files that launch real browsers — each with its own worker cap derived from core count and RAM
  • the is-ci check this replaces has been decorative since vitest renamed minThreads/maxThreads, so runs have been at one fork per core with browsers scattered across all of them for who knows how long
  • The Playwright plugin matrix in plugins.test.ts is Chromium-only by default; CI and test:full run the full chromium,firefox,webkit via CRAWLEE_TEST_BROWSERS. Firefox and WebKit were ~94s of that file's ~109s (on my machine).
  • Also gone: the esbuild block (oxc ignores it and warns on every run)

Wall time now floors out on the longest single file rather than on CPU, so extra workers only buy contention: 4 → 12 browser workers measured 127s → 111s for double the processes, and 10 → 16 unit workers measured 43.7s → 45.6s plus two contention failures. Splitting the Puppeteer and Playwright halves of browser-pool.test.ts (~86s, 88 sequential launches in one file) is the obvious next step if the browser group needs to get faster.

@janbuchar janbuchar added adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. labels Sep 8, 2026
@github-actions github-actions Bot added this to the 149th sprint - Tooling team milestone Sep 8, 2026
@github-actions github-actions Bot added the tested Temporary label used only programatically for some analytics. label Sep 8, 2026
@janbuchar janbuchar changed the title perf(tests): Improve local test performance perf(tests): Improve local unit test performance Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants