Skip to content

Campaign: build performance — full verification under 10 min and 8 GB #679

Closed

Description

@ehartford

Maintainer ruling (2026-07-17): the ~40-min / >30 GB verification battery is unacceptable; fix deeply. Evidence base: docs/build-perf-reference-study.md (10 adversarially-verified deltas vs .reference/{go,rust,swift,Vale,zig}) and the first-ever measured breakdown (out/.build-state/build-times.tsv): stage1 175.9s + stage2 174.3s + link-compiler 173.0s = 77% of an 11.4-min 'with build'.

Landed in the opening session: per-target timing (c3de4c0), unstamped-binary verdict keying (4dcf941), core-width sliding-window test runner (196056a), :dev iterate tier + D14 verification tiering, stamp temp-sibling hardening, #650 post-link stamping (5f8ad53). Measured: commit-only rebuild 16s (was ~12 min); test leg ~8 min (was ~22); non-compiler commits post-reseed ≈ seconds of verdict sweep.

Remaining arc (dependency order, each its own issue): parallel executor → codegen-unit memory windowing → prelude snapshot → compiled build graph → separate compilation. Targets: iterate loop ≤3.5 min; commit battery ≤10 min; peak RSS ≤8 GB. Invariants that do NOT bend: self-hosting, -O1 everywhere, per-commit byte-fixpoint, no external build deps (see study §What NOT to Copy).

Activity

  1. ehartford commented on Jul 18, 2026

    @ehartford
    ContributorAuthor

    Maintainer directive (2026-07-18): after #681/#682/#683 land, the next campaign goal is PEAK BUILD MEMORY UNDER 8 GB — the compiler must build on an 8 GB machine on Mac, Linux, and Windows. This hardens #679's 8 GB target from aspiration to requirement and makes #681's structural tier + #685 (phase-scoped arenas/disposal) load-bearing: an 8 GB host cannot hold even one full-module LLVM parse (~3 GB) beside the frontend (~2.5 GB) plus MIR, so per-unit IR generation from MIR (no whole-module bitcode round-trip) and aggressive phase disposal are the architecture. The existing host-aware unit formula ((mem_gb-6)/3) collapses to a single whole-module pipeline on small hosts, which likely ALSO exceeds 8 GB today — that needs measurement as the campaign baseline.

  2. ehartford commented on Sep 1, 2026

    @ehartford
    ContributorAuthor

    First combined time×memory baseline (per-target peak-RSS instrumentation landed in ea2196d3; cold full build + :test orchestrated by the instrumented stage1, 2026-09-01):

    Time funnel:

    • with build (cold): 195s — link-compiler 79.6s + stage2 80.8s dominate, as before
    • :test (cold): 538s wall for 630s of lane work — parallelism factor 1.17×, i.e. nearly serial. This is the campaign's biggest single prize: at realistic width the ~470s of independent lane work outside the serial stage/link prefix walls at ~90-150s. Build: parallel build-graph executor with memory-claim admission (study delta 8) #680 alone plausibly brings the full battery from ~15min to ~10min, with fixpoint's two serial 45s objects as the next parallelization after that.

    Memory (first real measurement):

    Instrumentation caveats (v1): in-process targets report high-water DELTA (stage2/link show 0M when the mark was already set — their true footprint is bounded by the 456M total); grandchildren are invisible (behavior-tests shows 1M because its sliding-window compiler children aren't summed into the lane driver's rusage). Both documented in the reporter; neither changes the conclusions' direction.

    Recommended order confirmed by data: #680 parallel executor first (the 1.17× factor is the money), with a simple width×per-lane-RSS cap as admission (8GB is nowhere near binding at measured footprints); then fixpoint-object parallelization; then #682 prelude snapshot for the per-test compile tax. Also chasing: test-green spends 75.3s recording evidence — that smells like re-verification, not recording.

  3. ehartford commented on Sep 1, 2026

    @ehartford
    ContributorAuthor

    Targets re-derived from principle (Eric's ruling, 2026-09-02) — recorded in docs/perf/README.md:

    Arc re-ordered by the baseline data: #680 parallel executor → fixpoint-object parallelization → #684 promoted (the only item that delivers the iterate target; no longer the tail-end 'endgame') → #682. Memory-windowing is cut pending #702's re-verification — the first casualty of actually measuring.

  4. added a commit that references this issue on Sep 1, 2026
  5. ehartford commented on Sep 1, 2026

    @ehartford
    ContributorAuthor

    Reference pause + ruling (2026-09-02): the compiled-build-graph arc item is promoted to next — see the new campaign issue. Evidence: every worker child re-evaluates build.w (~35-70s measured in the test-green worker; the same tax capped #680's lane pooling at 16%). All four references compile build logic natively, evaluated at most once per build. Tactical evaluator fixes banked meanwhile: test-green 79.2s -> 34.8s (decl-index memoization + same-file context skip + bulk push_str).

  6. ehartford commented on Oct 25, 2026

    @ehartford
    ContributorAuthor

    Triage 2026-10-25, with v0.15.3.0 (main a261b65): the headline goal is met. Today's seed-driven battery (gate, uat and battery-checks in one graph run) took 445 s on this tree, and the costliest target's peak RSS is 3.2 GB (pub-lint-check; stage1 and stage2 1.6 GB each), from the machine's battery ledger ~/.local/with-green/battery-times.tsv.

    The remaining parts are tracked by their own issues (#682, #684, #685, #702), so this umbrella closes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions