perf(content): close prepared asset cutover

This commit is contained in:
Erik 2026-07-24 15:49:24 +02:00
parent b1ad4b7c0a
commit a564c4b782
11 changed files with 428 additions and 66 deletions

View file

@ -1562,9 +1562,10 @@ port in any phase — no separate listing here.
> remains DEFERRED**: ECS is the *throughput* lever (raise avg FPS ~230→300), a
> DIFFERENT goal from steadiness — revisit ONLY if the user wants a higher raw FPS
> number and accepts the rewrite risk. Rust rejected. Parked (resume from the table
> below): MP1b pak/bake is now complete and the corrected physical-local
> baselines have landed, so MP1c is active. The remaining parked items are
> MP-Alloc hard sites and MP1c. MP2 has shipped. Full rationale:
> below): MP1b pak/bake and MP1c production cutover are now complete. The
> remaining parked items are MP-Alloc hard sites; typed residency and
> cost-budgeted streaming continue as Slices D/E in the modern-runtime plan.
> MP2 has shipped. Full rationale:
> `project_mp_track_findings.md`.
> The 2026-07-18 portal/resource-lifetime repair does not resume MP's ECS, pak,
> or throughput redesign. It is corrective ownership/reclamation work for a
@ -1588,10 +1589,15 @@ port in any phase — no separate listing here.
> portal windows, observer-effect measurement, binary provenance, and
> contention stacks. The physical runs confirm fast steady rendering but also
> preserve repeated-portal memory plateau failures, ~200 MiB allocation frames,
> and thousands of invalid typed-Setup probes as MP1c's before-state. Slice C
> is unblocked and active. Slice B EnvCell dedup is complete; its
> and thousands of invalid typed-Setup probes as MP1c's before-state. Slice B
> EnvCell dedup is complete; its
> [full-bake report](../research/2026-07-24-slice-b-full-bake-report.md)
> records the 42.6× result and corrected geometry-identity collision.
> **Slice C completed 2026-07-24:** production streaming consumes the validated
> bake-tool-3 package, all physical connected and user-visual gates passed,
> process allocation fell 41.861.9%, GC pause time fell 48.454.1%, and
> invalid typed-Setup exceptions fell to zero. [Cutover
> report](../research/2026-07-24-slice-c-prepared-asset-cutover-report.md).
**Spec:** `docs/superpowers/specs/2026-07-05-modern-pipeline-design.md` (the
umbrella design — read it first). **Goal:** smoothness first (no frame over
@ -1616,7 +1622,7 @@ hitch and follows.
| MP1b | Pak format + `acdream-bake` CLI + mmap `PakReader` + equivalence/full-scale gate | ✅ **SHIPPED 2026-07-24** — 729,888 EnvCell keys → 17,117 unique geometries + 712,771 aliases (42.6×), 751,141 total keys / 38,370 physical blobs, zero failures, 28,192.4 MiB, 81.4 s validated atomic publish; full-DAT gate also corrected a real collision in WB's legacy geometry hash. [Report](../research/2026-07-24-slice-b-full-bake-report.md) |
| **MP-Alloc (safe batch)** | Reuse per-frame buffers: anim pose, particle draw-list, interior partition, animatedIds/drawableCells sets | ✅ SHIPPED + USER-GATED 2026-07-05 — dense-town frame-time spikes 2087ms → 610ms, alloc spikes (3075MB single-frame) eliminated, gen2 GC 511/window → ~0; user confirms FPS steady. 4 commits `b8c05e2b`..`91afea24` |
| MP-Alloc (hard sites) | EnvCell settled-camera rebuild gate + physics `Transition` pooling — the residual steady ~1.6MB/frame | ⚪ OPTIONAL follow-up — would lower the median too, but the wild-swing complaint is already resolved; each needs its own careful gate (batch correctness / physics faithfulness) |
| MP1c | Streaming cutover to pak + hitch gate | **ACTIVE 2026-07-24** — physical-local Slice A gate committed; baseline: uncapped CPU p50/p95/p99 1.520/5.694/7.825 ms, GPU 0.897/3.239/3.406 ms, portal allocation max 212.7 MiB, repeated-Caul working-set growth 295.1 MiB. Slice B package foundation is complete |
| MP1c | Streaming cutover to pak + hitch gate | **SHIPPED 2026-07-24** — typed package-only production source, explicit Setup probes, non-allocating Portal-first lookup, exact translucency metadata, and ordered teardown; capped/uncapped/dense physical routes + user visual gate pass. Uncapped CPU p99 7.825→6.496 ms, GPU p99 3.406→2.706 ms, portal frame max 202.9→39.9 MiB, process allocation 41.8%, zero invalid Setup probes. [Report](../research/2026-07-24-slice-c-prepared-asset-cutover-report.md) |
| MP2 | Retail particle distance/cell-view degradation: DAT-authored range, exact infinite/finite off-view update branches, emitter-first render scan, user-requested 2× default range | ✅ SHIPPED 2026-07-17 — Aerlinthe hotspot `0x32000223` resolves to retail 64m and defaults to 128m; landscape/entity streaming distance unchanged |
| MP3 | Arch ECS render world + delta submission (the 300-FPS lever) | ⚪ — note: does NOT fix the steady-state GC churn (that's MP-Alloc); MP3 is the draw-submission throughput lever |
| MP4 | Zero-alloc frame loop + flat physics data (residual, post-MP-Alloc) | ⚪ hard-queued behind M1.5 #137 |

View file

@ -2,8 +2,7 @@
**Date:** 2026-07-24
**Status:** Slice A complete on the physical reference display; Slice B
complete. Slice C is unblocked and active.
**Status:** Slices AC complete. Slice D is next and not yet started.
**Scope:** Reconcile and sequence the existing Modern Pipeline (`MP`) and
Linux/headless (`LH`) tracks using the 2026-07-24 connected performance audit.
@ -631,6 +630,15 @@ collision in WorldBuilder's legacy 31× geometry hash. Evidence:
single-frame allocation and p99 materially improve from the 2026-07-24 baseline;
connected nine-stop route and screenshots pass.
**Completed 2026-07-24:** production streaming now consumes the validated
format-1/bake-tool-3 package through `IPreparedAssetSource`, with no implicit
live-DAT mesh fallback. Capped, uncapped, and dense-Arwic physical routes,
installed-DAT equivalence, lifecycle assertions, graceful teardown, the full
Release suite, and the user's visual gate passed. Process allocation fell
41.861.9%, GC pause time fell 48.454.1%, uncapped CPU/GPU p99 improved
17.0%/20.6%, and invalid typed-Setup exceptions fell to zero. Evidence:
[`../research/2026-07-24-slice-c-prepared-asset-cutover-report.md`](../research/2026-07-24-slice-c-prepared-asset-cutover-report.md).
**Amendment (2026-07-24 review).** Binding contracts for this slice:
- **Precedence contract.** The LINQ being replaced is load-bearing content
@ -1129,13 +1137,14 @@ an improvement" carries the same evidence burden as a regression claim.
## 14. Current execution point
Slice A's tooling and authoritative physical-local evidence are complete, and
Slice B's prepared-content bake is complete. Slice C is active. Its comparison
baseline is the committed physical-local capture at
`49f3a48ee63b82d00731b0f91497930925279c86`: uncapped CPU p50/p95/p99
1.520/5.694/7.825 ms, GPU p50/p95/p99 0.897/3.239/3.406 ms, portal allocation
max 212.7 MiB, process allocation mean 50.0 MB/s, and a repeated-Caul working
set plateau failure of 295.1 MiB.
Slices AC are complete. Slice C replaced production live-DAT world-mesh
extraction with the validated prepared source and passed all connected,
performance, lifetime, automated, and user-visual gates. Its physical
uncapped result is CPU p50/p95/p99 1.409/4.909/6.496 ms, GPU
0.832/2.510/2.706 ms, a 39.9 MiB largest frame allocation, zero invalid Setup
probe exceptions, and a passing warm repeated-Caul memory assertion. Slice D
is the next execution point; it unifies accounting and policy around the
specialized caches that remain, rather than replacing their working storage.
The intended order is therefore:

View file

@ -2,15 +2,18 @@
**Date:** 2026-07-24
**Status:** active — C1 and C2 landed; C3 implemented, C4 connected gate next
**Status:** complete — automated, connected, performance, and user visual
gates passed 2026-07-24
**Checkpoint ledger:**
- C1 typed prepared-source boundary — `c42f93b3`
- C2 production renderer injection — `f05afc07`
- C3 activation probes and lookup precedence — `230a7df4`; automated gate
green, connected exception-count gate remains in C4
- C4 connected equivalence and performance closeout — pending
green
- C4 prepared-source diagnostics — `b1ad4b7c`
- C4 connected equivalence and performance closeout —
[`../research/2026-07-24-slice-c-prepared-asset-cutover-report.md`](../research/2026-07-24-slice-c-prepared-asset-cutover-report.md)
**Parent:** [`2026-07-24-modern-runtime-architecture.md`](2026-07-24-modern-runtime-architecture.md),
Slice C / MP1c
@ -300,6 +303,32 @@ If pixels or behavior differ, the slice is not complete even when performance
improves. If timing improves but heap reservation still fails, keep the failure
open and attribute it before considering Slice C closed.
### C4 result — completed 2026-07-24
The format-1/bake-tool-3 production package validated with 751,141 keys and
the exact installed DAT iterations. Installed-DAT seam/equivalence tests, all
three connected physical-display routes, canonical lifetime assertions, and
the complete Release suite passed. The user accepted the prepared path's
geometry, materials, textures, and world presentation.
Against the committed Slice A physical baseline:
- capped CPU p95/p99 improved 15.8%/16.9%, GPU p95/p99 17.4%/20.0%;
- uncapped CPU p95/p99 improved 13.8%/17.0%, GPU p95/p99 22.5%/20.6%;
- dense-Arwic CPU/GPU p99 improved 12.0%/16.8%;
- process allocation fell 54.9% capped, 41.8% uncapped, and 61.9% dense;
- GC pause time fell 52.8%, 48.4%, and 54.1%;
- the invalid typed-Setup exception count fell to zero in every route;
- the largest frame-thread allocation fell from roughly 203 MiB to 46.8 MiB
capped and 39.9 MiB uncapped;
- both warm repeated-Caul memory comparisons passed the unchanged assertion.
Windows reports clean memory-mapped package pages in working set, so total
working set is higher even though private memory and ownership remain bounded.
That is file cache, not retained world state. Exact measurements and the
artifact policy are recorded in the
[Slice C report](../research/2026-07-24-slice-c-prepared-asset-cutover-report.md).
## 4. Review checklist per checkpoint
Because this task is running without delegated reviewers, the primary engineer