Commit bf68a85
Parallelize gql-codegen with other checks tasks (#25485)
## Summary
Merges the `gql-codegen` turbo invocation into the main checks turbo
run, allowing it to execute in parallel with `format`, `circular-deps`,
`package:checks`, and the `^build` dependencies that `lint`/`test` need.
Also adds explicit `gql-codegen` as a `dependsOn` for `lint`, `test`,
`types`, and `circular-deps` in turbo.json to ensure correctness — these
tasks need the generated files from codegen.
**Before:**
```
yarn deps:check && turbo gql-codegen && turbo run lint format test circular-deps package:checks
```
gql-codegen (~56s) blocks everything — format, circular-deps,
package:checks all wait.
**After:**
```
yarn deps:check && turbo run gql-codegen lint format test circular-deps package:checks
```
Turbo schedules all tasks optimally. Tasks that need codegen (lint,
test, types, circular-deps) explicitly depend on it in turbo.json. Tasks
that don't (format, package:checks) start immediately.
## Local benchmarks (interleaved, 10 pairs)
Fair A/B comparison — each pair runs sequential then parallel
back-to-back under identical cache conditions:
| Pair | Sequential | Parallel | Saved |
|------|-----------|----------|-------|
| 1 | 3m 58s | 3m 31s | 26s |
| 2 | 3m 57s | 3m 15s | 42s |
| 3 | 4m 28s | 3m 36s | 51s |
| 4 | 3m 58s | 2m 51s | 1m 07s |
| 5 | 3m 41s | 3m 01s | 40s |
| 6 | 3m 36s | 2m 36s | 59s |
| 7 | 3m 28s | 2m 35s | 52s |
| 8 | 4m 06s | 3m 08s | 58s |
| 9 | 3m 50s | 3m 03s | 47s |
| 10 | 3m 44s | 2m 59s | 44s |
| **mean** | **3m 52s** | **3m 03s** | **49s (21%)** |
| **median** | **3m 57s** | **3m 03s** | **51s** |
**Parallel wins 10/10 pairs.** Also more consistent (1m range vs 1m
33s).
## CI validation (2 runs on 8-core ARM)
| Metric | Sequential baseline | Parallel |
|--------|-------------------|----------|
| yarn checks | 3m 35s | 2m 43s |
| check job | 5m 25s | 4m 21s |
## Test plan
- [x] `yarn checks` passes in CI
- [x] gql generated code check still passes
- [x] Verified via `--dry` that lint/test/types/circular-deps depend on
gql-codegen in correct workspaces
- [x] Verified via verbose build that ops:gql-codegen completes before
ops:lint starts
- [x] Local interleaved benchmark: 10/10 pairs faster, mean 49s saved
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
GitOrigin-RevId: 311c089549739aea21310be574d328069eef79ae1 parent 06ecc78 commit bf68a85
2 files changed
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
0 commit comments