Files
VoxelForge/Standalone/Research/WorldAssemblerM3/Linux124/REPORT.md
T
Fr0zkaandClaude Opus 5.5 c743f2abc7 research: early arrival tiles before shape publication (L124, measured not worth it)
Shape gate is real (no LOD0-2 tile before shape ready, ~180-226 ms) but the shape pool is already ~8/8 busy;
independent 27-tile pages net at most ~62 ms (VS negative). Near-ready today: SW 0.69-0.71 s, VS 0.84-0.99,
TN 1.24-1.37, FI 1.33-1.44 s. No runtime change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016dhxM43dnWvUu2B5Ph1iG1
2026-10-30 10:33:13 +01:00

46 lines
4.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# L124 — early arrival tiles
## Decision
Measured **not worth shipping** the design that independently builds pages for the nearest 27 LOD0 tiles. The existing shape gate is real, but this page set can remove only a small amount of work from the LOD0–2 completion path. Its estimated best case is below 100 ms for every stratum/worker pair except the unadjusted FI W8 tile-work ceiling; after page work, the largest estimate is 62 ms. VS is negative. No second design or runtime change was pursued.
## Current L80 timings
Five interleaved W8/W12 runs per stratum, Clang 19, policy 3, L80 protocol, source stamp `3f48d5ef6dfd7e735afcd824b742f997179810acd3ca76601a99c1131efb482e`. Values below are medians. `Near ready` is the complete LOD0–2 set.
The host load was 0.5–1.7 before baseline timing. The unchanged headless binary was built first; no build overlapped a timing run.
| Stratum | LOD0–2 tiles | Shape wall W8/W12 | First tile ready W8/W12 | Near ready W8/W12 |
|---|---:|---:|---:|---:|
| SW | 1,408 | 208/204 ms | 280/281 ms | 709/690 ms |
| FI | 1,216 | 182/179 ms | 261/261 ms | 1,441/1,329 ms |
| TN | 1,344 | 205/210 ms | 284/275 ms | 1,372/1,243 ms |
| VS | 1,344 | 226/221 ms | 291/283 ms | 992/835 ms |
A separate cold timeline trace put shape-build start at 58–60 ms after process start and shape ready at 233–279 ms. The first LOD0–2 admission followed 0.65–0.70 ms later; there were zero LOD0–2 admissions before shape ready. The exact per-run records are in `Saved/Linux/l124/timing/` and `Saved/Linux/l124/workers/`.
## What a tile reads
`World::compile` publishes `shapeReady` only after `FStandaloneShapeWorld::Build` finishes. Shape-dependent `generateTile` calls wait for that publication. A tile’s mesher uses `ClassifyBoxDetailed`, lattice density queries, and off-grid `DensityAtUnclamped` queries for gradients and seam normals. Density dispatch can read native surface/island/lattice fields, or packed `RockWords`, `CandidateWords`, and `SurfaceDistanceQ`; fallback queries use analytic density. Composition also reads stratum transitions, cavern fields, stamps/edits, and passage carve data. The tile query scope includes a one-step normal halo and selects passage features, while passage void-crossing plans and primitive/field indices must already be valid.
An exact local page is feasible: the existing full page builder constructs those dependencies. A temporary probe built a 128-voxel LOD0 page independently after base compilation and compared the center tile’s density, mesh, payload, and topology hashes. All four matched for SW, FI, TN, and VS at W8 and W12. This covered one tile per fixture, not the full 27-tile ring. The normal `compileTileRegion` path still requires the base shape and forwards page queries to it, so it cannot currently publish that page early.
## Cost count
An exact 128-voxel page took a median 7.5–12.6 ms wall per page (three interleaved W8/W12 probes); reported parallel-stage worker time was about 27–63 ms. The nearest 27 LOD0 tiles span 1 SW page, 8 FI pages, 1 TN page, and 4 VS pages. Their measured tile-service CPU and an optimistic cost-adjusted budget are:
| Stratum | Ring tile CPU W8/W12 | Estimated net budget W8/W12 |
|---|---:|---:|
| SW | 439/770 ms | 51/62 ms |
| FI | 818/1,134 ms | 41/57 ms |
| TN | 402/577 ms | 43/43 ms |
| VS | 96/175 ms | −20/−5 ms |
The budget subtracts reported page worker time for the required page count, then divides by stream workers. That counter excludes local primitive-build CPU. It also assumes all 27 tile jobs leave the post-shape queue and ignores contention, so it is an optimistic estimate, not an observed A/B speedup.
During the base build, stream workers were idle for 8.00/8 or 12.00/12 worker-equivalents. Shape helper stages averaged 7.1–7.97 active workers of the configured 8; detail work alone occupied 52–87 ms wall. Whole-build process use averaged 4.6–5.3 of the 12 pinned CPUs. Early page and tile work would overlap the periods where the shape helper pool is full. Given the sub-100 ms estimate and VS’s negative budget, I stopped before adding publication and scheduling code.
## Validation and artifacts
The temporary page-cost/equivalence hooks were removed and the headless binary rebuilt against the unchanged L123 source stamp. No 24/24 hash matrix, unpublished-page poison assertion, 30 m/s trace, fast tier, or Linux UE candidate timing was run because no runtime change was retained. The independent-page hash probe was only a viability check after full shape publication. Baseline logs are in `Saved/Linux/l124/{timing,workers,page-cost,page-equivalence}/`.