From 3e71a96981c9c0a2bf80f75293669fd62be55f3f Mon Sep 17 00:00:00 2001 From: Luke Curley <432854+kixelated@users.noreply.github.com> Date: Tue, 20 Oct 2026 15:25:56 -0700 Subject: [PATCH 1/6] chore: claim compile-time audit Co-Authored-By: Claude Opus 5.5 From bb68d8df48b8c991a9fdabe9b25316a3b052b994 Mon Sep 17 00:00:00 2001 From: Luke Curley <432854+kixelated@users.noreply.github.com> Date: Tue, 20 Oct 2026 16:32:42 -0700 Subject: [PATCH 2/6] wip(quest): record moq-tokio monomorphization measurements Co-Authored-By: Claude Opus 5.5 --- quest/m0/audit-compile-time.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/quest/m0/audit-compile-time.md b/quest/m0/audit-compile-time.md index b7b9a88ef2c..414d9decd6f 100644 --- a/quest/m0/audit-compile-time.md +++ b/quest/m0/audit-compile-time.md @@ -92,6 +92,21 @@ Raw logs and Cargo timing reports were local only; re-measure rather than trusting anything beyond these tables. `cargo llvm-lines` was unavailable in the pinned shell. +Measured 2026-10-20 on `eecb86c5f` (same shell, two jobs, host load 18 to +21): `cargo llvm-lines` 0.4.48 works from `nix shell nixpkgs#cargo-llvm-lines`. +The moq-tokio dev lib (default features) emits 1,653,007 LLVM IR lines in +53,946 copies. By defining crate: moq-net 35.1%, core 17.9%, tokio 15.1%, +moq-tokio 11.4%. 43.5% (719,215 lines) is generic code instantiated once per +transport: `transport::Session` 14.5% and +`transport::Session` 14.1%, each again wrapped in moq-net's +IETF `ControlStreamAdapter` (7.5% each). Erasing the transport once at +moq-net's session entry would drop most of that, but boxes streams and adds a +dynamic call per poll, so it needs a benchmark; it is a follow-up candidate. +usage-rs derive output (`::_::` config functions) is 85,831 lines (5.2%); the +crate is external (jdx/usage). moq-net, moq-relay, moq-mux, and moq-cli +llvm-lines runs and a release `-Z time-passes` attribution were started and +interrupted before finishing. + Remaining work before completing this run: 1. Record a successful ordinary net-edit `just check` with a formatted probe, From 84028acc3a4ac63d4cb3511655253513e4006f0d Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Tue, 20 Oct 2026 20:05:14 -0700 Subject: [PATCH 3/6] quest: finish the m0 compile-time audit and plan the m1 run Records llvm-lines for moq-tokio, moq-net, moq-mux, moq-relay and the moq CLI, release -Z time-passes attribution for the moq binary, and a net-edit `just check` baseline. The largest attributable cost, moq-net monomorphized per transport, is already planned in quest/m1/net-erase-transport.md. Co-Authored-By: Claude Opus 5.5 --- quest/m0/README.md | 1 - quest/m0/audit-compile-time.md | 125 --------------------------------- quest/m1/README.md | 1 + quest/m1/audit-compile-time.md | 117 ++++++++++++++++++++++++++++++ 4 files changed, 118 insertions(+), 126 deletions(-) delete mode 100644 quest/m0/audit-compile-time.md create mode 100644 quest/m1/audit-compile-time.md diff --git a/quest/m0/README.md b/quest/m0/README.md index d08374ee92e..4b892c832fe 100644 --- a/quest/m0/README.md +++ b/quest/m0/README.md @@ -87,6 +87,5 @@ Each lands its fixes in its own PR and plans only what needs a decision. - [Namespace advert errors](/quest/m0/namespace-advert-error.md) - one PUBLISH_NAMESPACE stream failing withdraws only that namespace instead of closing the Rust session - [Broadcast epochs](/quest/m0/broadcast-epoch/README.md) - every first-party publisher that can restart mints a fresh route epoch, the newest wins a path, and only routes with the same epoch resume a subscription - [Performance audit](/quest/m0/audit-perf.md) - benchmarks that regressed since the last run are explained, fixed, or planned, and unbenched hot paths get coverage -- [Compile time audit](/quest/m0/audit-compile-time.md) - build-time hotspots are measured against a baseline and the worst are fixed or planned - [Simplification audit](/quest/m0/audit-simplify.md) - overbuilt code and APIs are collapsed, merged, or narrowed into a net simpler whole - [Quest tree audit](/quest/m0/audit-quests.md) - the tree agrees with itself and with main diff --git a/quest/m0/audit-compile-time.md b/quest/m0/audit-compile-time.md deleted file mode 100644 index 414d9decd6f..00000000000 --- a/quest/m0/audit-compile-time.md +++ /dev/null @@ -1,125 +0,0 @@ -# [M] Compile time audit - -## Goal - -The crates, dependencies, and code that dominate build time are known, with -recorded baselines, and the worst are fixed or planned. - -## Plan - -Recurs once per major release (decided 2026-10-19). The PR that finishes -this run also adds the next one with the same file name at the end of the next -milestone's `Required` (m0 to m1, m1 to m2). The successor keeps the Goal -and this paragraph; the rest of its Plan is rewritten with what this run -learned: baselines, results, and what to check first. A successor placed in m2 -also lists the [release cut](/quest/m2/release/cut.md) under `Required`, so it -waits for the release in flight to ship. Only `/quest-delete` ends the -recurrence. Fixes land in the run's PR, one commit each, rather than as follow-ups. -Only a change that needs a maintainer decision (public API, scope) or is -independently landable and too large to review alongside the rest becomes a -follow-up through `/quest-plan`. - -Measured 2026-10-19 on `cdff3c8f9` in the pinned Nix shell (Rust 1.98.1, -LLVM 22.1.8, Linux x86_64, Ryzen 9 5900XT, 32 logical CPUs), with Cargo, -native build tools, and Nextest bounded to two jobs. These are single -observations, not regression limits or evidence of an optimization. - -Scope: this audit owns per-crate build cost in one build (dev, release, and -incremental). The [CI pipeline audit](/quest/m0/ci/audit.md) owns job-level CI -cost: cache keys and hits, aws-lc-sys recompiling several times per cold job, -both rustls backends in the gate, and `--timings` output in CI. Deduplicating -or upgrading dependencies belongs to the -[dependency audit](/quest/m1/audit-deps.md). - -Clean builds used `MBX_DISABLE=1` and a fresh `CARGO_TARGET_DIR`, with registry -sources and the Nix shell already present; no cache, compiler, profile, or -feature setting was changed. The dev build ran on a quiet host (one-minute load -0.66 to 2.65); release and later runs shared it with bounded builds in other -worktrees (load up to 6.14). Do not compare their wall times as a before/after -result. Times exclude Nix startup. - -| Experiment | Process wall time | Result | -| --- | ---: | --- | -| `cargo build --locked --timings` | 274.015 s | Passed; Cargo reported 4m32s | -| `cargo build --locked --release --timings` | 821.054 s | Passed; Cargo reported 13m40s | -| Unchanged default-member dev build | 0.497 s | Passed | -| Warm exact `cargo build --locked -p moq-net --timings` graph | 21.195 s | Passed; setup for the next two runs | -| Unchanged standalone moq-net build | 0.251 s | Passed | -| Standalone moq-net rebuild after a comment-only edit | 8.025 s | Passed; trivial-edit baseline only | -| Ordinary cache-enabled `just check` on that moq-net edit | 842.849 s | Failed at formatting; not a successful full-check baseline | - -The default-member dev build compiled 681 Cargo units from 545 distinct -package/version pairs. Longest observed units, in seconds: - -| Cargo unit | Dev | Release | -| --- | ---: | ---: | -| moq-cli binary (`moq`) | 14.87 | 342.30 | -| moq-relay binary | 5.13 | 191.80 | -| aws-lc-sys build-script execution | 87.59 | 102.69 | -| moq-boy binary | 3.74 | 101.72 | -| moq-bench binary | 3.76 | 83.95 | -| moq-tokio library | 17.83 | 50.77 | -| moq-relay library | 9.97 | 44.27 | -| moq-mux library | 8.55 | 30.46 | -| str0m library | 9.39 | 24.35 | -| yuv library | 10.75 | 23.07 | -| moq-net library | 10.01 | 21.06 | - -These are elapsed times for overlapping units, not additive critical-path or -CPU times. Final release binary work dominates the release observations, but -these timings do not separate monomorphization, optimization, LTO, and linking. -The existing release profile uses fat LTO and one codegen unit to keep shipping -artifacts compact; no profile change is justified by this run alone. -aws-lc-sys's build script is the largest dev unit; keep the crypto provider -unchanged unless a separately justified decision permits it. - -The largest dev proc-macro unit was usage-derive at 6.02 seconds; serde_derive -was 2.61 seconds. Fifty-one compiled dependency names had multiple versions; -the three syn versions took 2.99, 2.41, and 2.53 seconds. The default build -omitted iroh, wgpu, cpal, and OpenH264; it did compile str0m, object_store, and -the NVIDIA crates. Do not disable supported default functionality merely to -make a build smaller. - -The cache-enabled net-edit `just check` used mbx 1.23.0 (820 hits, 72 misses, -seven units not looked up, four bypasses) and selected 28 Rust packages, -including downstream C, FFI, GStreamer, and WASM crates. Test compilation took -7m46s; all 7,608 native tests passed, with 31 skipped, in 369.431 seconds. It -then failed `cargo fmt --all --check` on the disposable probe, so rustdoc and -later feature checks never ran. `mbx explain --last` had no recorded build, so -those misses are unattributed. - -Raw logs and Cargo timing reports were local only; re-measure rather than -trusting anything beyond these tables. `cargo llvm-lines` was unavailable in -the pinned shell. - -Measured 2026-10-20 on `eecb86c5f` (same shell, two jobs, host load 18 to -21): `cargo llvm-lines` 0.4.48 works from `nix shell nixpkgs#cargo-llvm-lines`. -The moq-tokio dev lib (default features) emits 1,653,007 LLVM IR lines in -53,946 copies. By defining crate: moq-net 35.1%, core 17.9%, tokio 15.1%, -moq-tokio 11.4%. 43.5% (719,215 lines) is generic code instantiated once per -transport: `transport::Session` 14.5% and -`transport::Session` 14.1%, each again wrapped in moq-net's -IETF `ControlStreamAdapter` (7.5% each). Erasing the transport once at -moq-net's session entry would drop most of that, but boxes streams and adds a -dynamic call per poll, so it needs a benchmark; it is a follow-up candidate. -usage-rs derive output (`::_::` config functions) is 85,831 lines (5.2%); the -crate is external (jdx/usage). moq-net, moq-relay, moq-mux, and moq-cli -llvm-lines runs and a release `-Z time-passes` attribution were started and -interrupted before finishing. - -Remaining work before completing this run: - -1. Record a successful ordinary net-edit `just check` with a formatted probe, - preserving its exact diff, selected packages, cache counters, and host load. -2. Attribute final release binary work with a supported LLVM-lines tool and - compiler/linker profiling before choosing a refactor. A thin-LTO experiment - must compare shipping sizes and relevant runtime workloads on the same - source; changing the release profile is a maintainer decision. -3. Fix or settle the measured bottlenecks, then create the recurring m1 - successor as required above. The nightly size job already records release - `Build` durations without comparing noisy hosted times (`sh/size/README.md`). - -## Related - -- [CI pipeline audit](/quest/m0/ci/audit.md) - owns job-level CI build cost and caching -- [Dependency audit](/quest/m1/audit-deps.md) - owns deduplicating and upgrading dependencies diff --git a/quest/m1/README.md b/quest/m1/README.md index b9592b2094c..bfa7dcd4265 100644 --- a/quest/m1/README.md +++ b/quest/m1/README.md @@ -136,6 +136,7 @@ lands before the cut. - [CI workflow audit](/quest/m1/audit-ci.md) - every workflow and job gives a signal someone sees, at a cost that signal justifies, or is fixed, moved, or deleted - [Documentation audit](/quest/m1/audit-docs.md) - stale pages, examples, links, and undocumented exports are fixed or planned - [Artifact size audit](/quest/m1/audit-size.md) - binary, FFI, WASM, and bundle growth since the m0 run is explained, fixed, or planned +- [Compile time audit](/quest/m1/audit-compile-time.md) - build-time hotspots are measured against the m0 baselines and the worst are fixed or planned ## Related diff --git a/quest/m1/audit-compile-time.md b/quest/m1/audit-compile-time.md new file mode 100644 index 00000000000..f7db9d26a3c --- /dev/null +++ b/quest/m1/audit-compile-time.md @@ -0,0 +1,117 @@ +# [M] Compile time audit + +## Goal + +The crates, dependencies, and code that dominate build time are known, with +recorded baselines, and the worst are fixed or planned. + +## Plan + +Recurs once per major release (decided 2026-10-19). The PR that finishes +this run also adds the next one with the same file name at the end of the next +milestone's `Required` (m0 to m1, m1 to m2). The successor keeps the Goal +and this paragraph; the rest of its Plan is rewritten with what this run +learned: baselines, results, and what to check first. A successor placed in m2 +also lists the [release cut](/quest/m2/release/cut.md) under `Required`, so it +waits for the release in flight to ship. Only `/quest-delete` ends the +recurrence. Fixes land in the run's PR, one commit each, rather than as follow-ups. +Only a change that needs a maintainer decision (public API, scope) or is +independently landable and too large to review alongside the rest becomes a +follow-up through `/quest-plan`. + +Scope: this audit owns per-crate build cost in one build (dev, release, and +incremental). The [CI workflow audit](/quest/m1/audit-ci.md) owns job-level CI +cost and caching; the [dependency audit](/quest/m1/audit-deps.md) owns +deduplicating and upgrading dependencies. + +What to check first: whether [moq-net compiles once](/quest/m1/net-erase-transport.md) +landed. If so, rerun `cargo llvm-lines` on the moq-tokio lib and compare the +transport share below. Then whether `cargo-llvm-lines` joined the pinned shell. + +### Baselines (m0 run, 2026-10-19 and 2026-10-20) + +Pinned Nix shell (Rust 1.98.1, LLVM 22.1.8), Linux x86_64, Ryzen 9 5900XT, +32 logical CPUs, Cargo, native tools and Nextest bounded to two jobs. The host +was shared with other builds; load is the one-minute average. Only the +llvm-lines counts are deterministic. Every time is load-sensitive and a single +observation: compare shares within a run, never seconds across runs. + +Clean builds (`MBX_DISABLE=1`, fresh target dir, registry and shell present): + +| Build | Source | Load | Wall | Longest unit | +| --- | --- | --- | ---: | --- | +| `cargo build --locked --timings` (default members) | `cdff3c8f9` | 0.7 to 2.7 | 274 s | aws-lc-sys build script 87.6 s | +| `cargo build --locked --release --timings` (default members) | `cdff3c8f9` | up to 6.1 | 821 s | moq-cli bin 342 s | +| `cargo build --locked --release -p moq-cli --timings` | `d55407256` | 21 to 89, median 55 | 1,213 s | moq-cli bin 644 s | + +The final `moq` binary unit was 42% and 53% of those two release walls. It is +serial: fat LTO with one codegen unit. + +`cargo llvm-lines` 0.4.48 (`nix shell nixpkgs#cargo-llvm-lines`), dev profile, +default features, on `d55407256`: + +| Target | LLVM IR lines | Copies | Notable share | +| --- | ---: | ---: | --- | +| moq-tokio lib | 1,661,503 | 54,069 | moq-net code generic over the transport session 43.2%; usage-rs derive 5.2% | +| moq-cli `moq` bin | 1,037,734 | 41,758 | tokio 30.1%; usage-rs derive 2.8% | +| moq-mux lib | 908,532 | 25,751 | serde 19.4%; mp4-atom `Any::decode_atom` over four reader types 4.2% | +| moq-relay lib | 711,268 | 27,162 | serde 28.0% (TOML config); usage-rs derive 8.6% | +| moq-net lib | 686,443 | 22,660 | BTreeMap internals 24.1% | +| moq-relay bin | 384,813 | 15,113 | tokio 29.8% | + +In moq-tokio the transport-generic share splits into +`transport::Session` and +`transport::Session`, each again under moq-net's IETF +`ControlStreamAdapter`, so the IETF half compiles four times. Dev builds share +generics, so downstream crates pay little of it (0.3% of the relay lib). + +`RUSTC_BOOTSTRAP=moq cargo rustc --locked --release -p moq-cli --bin moq -- -Z time-passes` +on `d55407256` (load 25 to 52, median 36; 429 s): + +| Pass | Seconds | Share | +| --- | ---: | ---: | +| `LLVM_fatlto` | 317.8 | 74.1% | +| `LLVM_passes` | 98.9 | 23.1% | +| `codegen_crate` (monomorphization and IR emission) | 7.2 | 1.7% | +| everything else (expansion, type and borrow checking) | 3.9 | 0.9% | +| `link` | 1.2 | 0.3% | + +Naming only the `moq` crate in `RUSTC_BOOTSTRAP` keeps build-script nightly +probes stable, so the dependency build is the ordinary one. Shares should hold +under load, since every pass is single-threaded CPU work in one process. + +Incremental: ordinary cache-enabled `just check origin/main` with one +formatted comment line appended to `rs/moq-net/src/lib.rs`, fresh target dir, +mbx 1.25.0, on `d55407256` (load 20 to 44, median 34; 646 s, failed). It +selected 29 Rust packages (moq-net and every dependent, including C, FFI, +GStreamer and WASM). Phases: rustdoc 1m41s (678 hits, 76 misses, 34 bypassed), +WASM clippy 18.8 s, io-uring clippy 33.5 s, test build 5m40s (524 hits, 83 +misses, 5 bypassed). Nextest started 7,890 tests and stopped after 663 on the +known [failover flake](/quest/m1/test-flakes-2/redundant-failover-drift.md). +Cargo rebuilds every dependent when an upstream crate's source changes at all, +even a comment, so the test build is the bulk of the compile cost. + +### Results of the m0 run + +- Planned: [moq-net compiles once](/quest/m1/net-erase-transport.md) removes + the per-transport copies, the largest attributable dev IR (43% of moq-tokio) + and a share of the release fat-LTO module. +- Explained, no action: the release `moq` unit is all LLVM backend work on one + fat-LTO module; linking is 1 s. The profile keeps shipping artifacts compact + for the Go mirror's 100 MB limit, and release builds are off the merge-queue + gate. aws-lc-sys's build script is the longest dev unit; the crypto provider + stays. usage-rs derive output is external code. serde visitors per + deserializer are inherent to TOML config. +- Candidates for next run: mp4-atom's `Any::decode_atom` instantiated per + reader type (38k lines in moq-mux, an upstream change to decode from one + slice type); a thin-LTO experiment only if release builds join a PR gate, + comparing shipping sizes and runtime on the same source. + +### Method + +Per target, `CARGO_TARGET_DIR=.scratch/target-lines CARGO_BUILD_JOBS=2 +MBX_DISABLE=1 cargo llvm-lines --locked -p --lib` (or `--bin`), then +group rows by the first path segment after stripping crate hashes, and by +substrings for the transport session types. Release: `cargo build --release +-p moq-cli --timings` into its own target dir, then the time-passes command +above. Sample `/proc/loadavg` every 30 s during each run. From 43a2de5e8235bc7695ef30b787bab79cc29aeb4f Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Tue, 20 Oct 2026 21:23:53 -0700 Subject: [PATCH 4/6] quest: record the thin-LTO experiment in the compile-time audit Thin LTO grows libmoq_ffi.a 13.8% (71.2 to 81.1 MiB of the Go mirror's 100 MiB limit), costs about 2% more instructions on moq-net benches, and cuts the final release unit's wall time by about 40% on two jobs. The profile stays fat pending the maintainer's decision. Co-Authored-By: Claude Opus 5.5 --- quest/m1/audit-compile-time.md | 57 +++++++++++++++++++++++++++++++--- 1 file changed, 52 insertions(+), 5 deletions(-) diff --git a/quest/m1/audit-compile-time.md b/quest/m1/audit-compile-time.md index f7db9d26a3c..f4fa7567616 100644 --- a/quest/m1/audit-compile-time.md +++ b/quest/m1/audit-compile-time.md @@ -91,21 +91,68 @@ known [failover flake](/quest/m1/test-flakes-2/redundant-failover-drift.md). Cargo rebuilds every dependent when an upstream crate's source changes at all, even a comment, so the test build is the bulk of the compile cost. +### Thin-LTO experiment (2026-10-20) + +The root `[profile.release]` (`lto = "fat"`, one codegen unit) builds every +shipped native artifact; `bench/ffi-gen` mirrors it but ships nothing, and +Cargo refuses `lto` in per-package overrides, so the choice is workspace-wide. +The Go mirror commits `libmoq_ffi.a` for four targets and fails its push at +100 MiB per file. Thin ran as `CARGO_PROFILE_RELEASE_LTO=thin` on `d55407256`, +x86_64 Linux host build, `nproc` 24, two jobs. + +Sizes (deterministic): + +| Artifact | Fat | Thin | Change | +| --- | ---: | ---: | ---: | +| `libmoq_ffi.a` (Go mirror, `--features openh264`) | 71.23 MiB | 81.07 MiB | +13.8% | +| `libmoq_ffi.so` | 33.88 MiB | 37.16 MiB | +9.7% | +| `moq` CLI | 48.62 MiB | 52.93 MiB | +9.0% | + +Both archives fit, but thin cuts the headroom under 100 MiB from 28.8 to +18.9 MiB. The mirror's v0.4.17 archives (fat, cross-built) are 62.3 MiB +(linux_amd64), 61.5 (linux_arm64), 54.4 (windows_amd64) and 40.5 +(darwin_arm64); the other targets were not built here. + +Build time, load 20 to 51 (load-sensitive; compare ratios): + +| Build | Fat wall | Thin wall | Thin/fat wall | Thin/fat CPU | +| --- | ---: | ---: | ---: | ---: | +| Clean `-p moq-ffi`, both modes at once | 544 s | 469 s | 0.86 | 1.00 | +| Then `-p moq-cli --bin moq`, both modes at once | 643 s | 545 s | 0.85 | 1.02 | +| `moq_ffi` final unit, interleaved, two rounds | 226, 256 s | 199, 158 s | 0.74 | 1.11 | +| `moq` final unit, interleaved, two rounds | 416, 404 s | 246, 240 s | 0.59 | 0.97 | + +Two jobs cap thin LTO's parallel backend at two threads, so a runner with +more cores would save more wall time than this; CPU time stays about even. + +Runtime (deterministic instruction counts, valgrind cachegrind on criterion +`--test`, which runs each case once; `perf stat` is blocked by +`perf_event_paranoid` 4): moq-net `session_delivery_viewers` (lite-06, +lite-07, moq-transport-22) 2,621M fat against 2,677M thin (+2.1%), and +`track_fanout` 414M against 421M (+1.6%). Repeats varied by 0.4% at most. + +Decision pending with the maintainer; the recommendation is to keep fat. +Thin saves about 40% of the final unit's wall time on two jobs, but release +builds run only nightly and on release PRs, off the merge-queue gate. It costs +10 MiB of the Go archive's headroom under a hard publish limit while that +archive is growing, and 2% more instructions. Revisit if release builds join +the PR gate, or once [moq-net compiles once](/quest/m1/net-erase-transport.md) +lands and the archive shrinks. + ### Results of the m0 run - Planned: [moq-net compiles once](/quest/m1/net-erase-transport.md) removes the per-transport copies, the largest attributable dev IR (43% of moq-tokio) and a share of the release fat-LTO module. - Explained, no action: the release `moq` unit is all LLVM backend work on one - fat-LTO module; linking is 1 s. The profile keeps shipping artifacts compact - for the Go mirror's 100 MB limit, and release builds are off the merge-queue - gate. aws-lc-sys's build script is the longest dev unit; the crypto provider + fat-LTO module; linking is 1 s. Thin LTO would cut that unit by about 40% + at a size and instruction cost (above); the profile stays fat pending the + maintainer's decision. aws-lc-sys's build script is the longest dev unit; the crypto provider stays. usage-rs derive output is external code. serde visitors per deserializer are inherent to TOML config. - Candidates for next run: mp4-atom's `Any::decode_atom` instantiated per reader type (38k lines in moq-mux, an upstream change to decode from one - slice type); a thin-LTO experiment only if release builds join a PR gate, - comparing shipping sizes and runtime on the same source. + slice type); rerun the thin-LTO comparison if release builds join a PR gate. ### Method From 74dfd2be74447e9fefaebd334965fb3ee9fc169a Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Tue, 20 Oct 2026 21:33:08 -0700 Subject: [PATCH 5/6] quest: list what the thin-LTO experiment did not measure Co-Authored-By: Claude Opus 5.5 --- quest/m1/audit-compile-time.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/quest/m1/audit-compile-time.md b/quest/m1/audit-compile-time.md index f4fa7567616..a157d0fe3a1 100644 --- a/quest/m1/audit-compile-time.md +++ b/quest/m1/audit-compile-time.md @@ -131,6 +131,9 @@ Runtime (deterministic instruction counts, valgrind cachegrind on criterion lite-07, moq-transport-22) 2,621M fat against 2,677M thin (+2.1%), and `track_fanout` 414M against 421M (+1.6%). Repeats varied by 0.4% at most. +Not measured: thin sizes for linux_arm64, darwin_arm64 and windows_amd64; +build time above two jobs; wall-clock runtime. + Decision pending with the maintainer; the recommendation is to keep fat. Thin saves about 40% of the final unit's wall time on two jobs, but release builds run only nightly and on release PRs, off the merge-queue gate. It costs From 3a3e59fde02cb19859f7b903f4c00a220ebfbc0c Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Tue, 20 Oct 2026 21:35:44 -0700 Subject: [PATCH 6/6] quest: record the maintainer's keep-fat-LTO decision Co-Authored-By: Claude Opus 5.5 --- quest/m1/audit-compile-time.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/quest/m1/audit-compile-time.md b/quest/m1/audit-compile-time.md index a157d0fe3a1..adfd07acbef 100644 --- a/quest/m1/audit-compile-time.md +++ b/quest/m1/audit-compile-time.md @@ -26,7 +26,8 @@ deduplicating and upgrading dependencies. What to check first: whether [moq-net compiles once](/quest/m1/net-erase-transport.md) landed. If so, rerun `cargo llvm-lines` on the moq-tokio lib and compare the -transport share below. Then whether `cargo-llvm-lines` joined the pinned shell. +transport share below, then rerun the thin-LTO size comparison against the +smaller archive. Then whether `cargo-llvm-lines` joined the pinned shell. ### Baselines (m0 run, 2026-10-19 and 2026-10-20) @@ -134,13 +135,13 @@ lite-07, moq-transport-22) 2,621M fat against 2,677M thin (+2.1%), and Not measured: thin sizes for linux_arm64, darwin_arm64 and windows_amd64; build time above two jobs; wall-clock runtime. -Decision pending with the maintainer; the recommendation is to keep fat. +Decision (maintainer, 2026-10-20): keep fat LTO, and revisit once +[moq-net compiles once](/quest/m1/net-erase-transport.md) shrinks the archive. Thin saves about 40% of the final unit's wall time on two jobs, but release builds run only nightly and on release PRs, off the merge-queue gate. It costs 10 MiB of the Go archive's headroom under a hard publish limit while that -archive is growing, and 2% more instructions. Revisit if release builds join -the PR gate, or once [moq-net compiles once](/quest/m1/net-erase-transport.md) -lands and the archive shrinks. +archive is growing, and 2% more instructions. Revisit sooner if release +builds join the PR gate. ### Results of the m0 run @@ -149,8 +150,8 @@ lands and the archive shrinks. and a share of the release fat-LTO module. - Explained, no action: the release `moq` unit is all LLVM backend work on one fat-LTO module; linking is 1 s. Thin LTO would cut that unit by about 40% - at a size and instruction cost (above); the profile stays fat pending the - maintainer's decision. aws-lc-sys's build script is the longest dev unit; the crypto provider + at a size and instruction cost (above); the maintainer kept fat LTO. + aws-lc-sys's build script is the longest dev unit; the crypto provider stays. usage-rs derive output is external code. serde visitors per deserializer are inherent to TOML config. - Candidates for next run: mp4-atom's `Any::decode_atom` instantiated per