You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Build: compile/serialize the build graph once per invocation; stop re-interpreting build.w per worker (study delta 9) #683
Part of #679. build(ctx) and every action run under the comptime interpreter, and each stale action/test target spawns a worker that re-compiles build.w + prelude and re-runs build(ctx) before evaluating its single action (src/main.w:1322-1356, rationale at :1424-1428), each eval deep-cloning Sema type tables (src/Sema.w:1294-1320). Measured: ~1.1s minimum per trivial action (build-times.tsv two-action probe). Zig compiles build.zig ONCE into a content-cached native build_runner (src/main.zig:4952, :5293-5326). Adopt: serialize the evaluated graph once per build (the action signature already hashes build.w source, so the invalidation key exists) and have workers load it. Expected: low single-digit minutes per battery + hundreds of MB of driver RSS; grows with the target graph that #680 will widen.
LANDED (c81e817, battery-green GATES EXIT: 0, fixpoint byte-identical, reseeded gc81e81739 + asset refreshed): serial build.w actions run in-process in the driver.
The measured floor was each serial action spawning with build :name --no-deps — a child that recompiled build.w + std.build through the full frontend (~0.85 s) and re-materialized the graph, only to reach the exact comptime_eval_tool_action_result call the parent could make directly with its already-evaluated Sema. The parent now falls through to the in-process eval and records the cache verdict itself (the always-false cache_recorded plumbing is deleted, −22 lines net).
Measured (18-core host):
Per serial action: compiler-main-source 1.6 → 0.0 s (byte-identical output), prepare-bootstrap-link-root 1.6 → 0.0 s, bootstrap-llvm-link-metadata 2.0 → 0.8 s.
Commit-shape rebuild (WITH_VERSION probe): 13.9 → 10.4 s (−25 %).
Full cold build driven by the new executor passed end-to-end in a clean worktree (46 targets).
What remains of the original scope, and why I'm closing anyway: pooled compile children still re-eval build.w per action, but their ~0.85 s each is hidden behind cores/2-wide parallelism (~3 s residual wall per cold build) — a worker-slice protocol isn't worth that residue. Test-target workers pay one re-eval per target (5/battery — noise). Full graph serialization is subsumed by #682's snapshot machinery if it ever becomes worth it: the graph metadata is trivial, and the action BODIES are comptime closures that need a compiled build.w Sema either way — which is exactly what #682 serializes. Reopen if pool-width-limited hosts measure differently.
Activity
Docs: handoff — campaign order #681→#682→#683, 8GB north star, #681 o…
Docs: handoff — #681 complete with mechanisms and landmines; next #682/…
Build: run serial build.w actions in-process (#683); drop per-action …
Docs: #683 in-process serial actions landed (13.9->10.4s commit rebui…
ehartford commentedon Jul 19, 2026
LANDED (c81e817, battery-green
GATES EXIT: 0, fixpoint byte-identical, reseeded gc81e81739 + asset refreshed): serial build.w actions run in-process in the driver.The measured floor was each serial action spawning
with build :name --no-deps— a child that recompiled build.w + std.build through the full frontend (~0.85 s) and re-materialized the graph, only to reach the exactcomptime_eval_tool_action_resultcall the parent could make directly with its already-evaluated Sema. The parent now falls through to the in-process eval and records the cache verdict itself (the always-falsecache_recordedplumbing is deleted, −22 lines net).Measured (18-core host):
compiler-main-source1.6 → 0.0 s (byte-identical output),prepare-bootstrap-link-root1.6 → 0.0 s,bootstrap-llvm-link-metadata2.0 → 0.8 s.WITH_VERSIONprobe): 13.9 → 10.4 s (−25 %).What remains of the original scope, and why I'm closing anyway: pooled compile children still re-eval build.w per action, but their ~0.85 s each is hidden behind cores/2-wide parallelism (~3 s residual wall per cold build) — a worker-slice protocol isn't worth that residue. Test-target workers pay one re-eval per target (5/battery — noise). Full graph serialization is subsumed by #682's snapshot machinery if it ever becomes worth it: the graph metadata is trivial, and the action BODIES are comptime closures that need a compiled build.w Sema either way — which is exactly what #682 serializes. Reopen if pool-width-limited hosts measure differently.
Build: fingerprint memory discipline + serial action workers (#702)