Skip to content

[codex] Lazily create route transform worker slots#63

Draft
ScriptedAlchemy wants to merge 4 commits into
codex/parallel-loader-experimentfrom
codex/lazy-route-worker-pool
Draft

[codex] Lazily create route transform worker slots#63
ScriptedAlchemy wants to merge 4 commits into
codex/parallel-loader-experimentfrom
codex/lazy-route-worker-pool

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Collaborator

Summary

  • Lazily allocate route transform worker slots instead of creating the full pool the first time the executor is used.
  • Keep task scheduling stable while only creating worker instances for slots that receive scheduled work.
  • Add focused test coverage for lazy worker-slot creation.

Why

The original worker executor created every route transform worker at the first parallel transform touchpoint. Lazy slot allocation reduces the dev startup cliff and gives the follow-up prewarm PR a cheaper baseline to build from.

Validation

Validated before stacking this PR:

  • pnpm exec tsc --noEmit
  • pnpm test tests/parallel-route-transforms.test.ts tests/index.test.ts tests/features.test.ts tests/build-output-transforms.test.ts
  • pnpm build

@github-actions

github-actions Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Benchmark Results

Compared PR head a3781b2 against base 7fe442c.

Total median wall time: 9.77s -> 9.72s (-0.5%, 1.01x speedup)
Compiler ready median: 9.77s -> 9.72s (-0.5%)
Route load median: 1.96s -> 1.99s (+1.5%)

Benchmark Base total Head total Delta Head ready Head routes Speedup Head RSS p95
large-355-ssr-esm 9.77s 9.72s -0.5% 9.72s 1.99s 1.01x -

Profile: large; mode: dev; iterations: 10; warmup: 0.
Workflow run

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.

1 participant