Versioned capsule vein records (stable ID, resource ID, endpoints, radius, seeded irregularity) resolved into the snapshot only when requested, placed beside the route and away from passages, landings and landmarks (forced-passage control rejected). The bound field table gains materialAt (host + two resource IDs + Q16 weights) behind a per-tile BVH; mesh export v2 carries per-vertex materials; a measurement-only yield computes removed resource volume (0 on already-air space). With veins on, every density, mesh, payload and topology hash is unchanged; demo off: owner hashes identical to L47. fast/medium/full PASS. Research R18 (cavern-graph planner) and R19 (why FloatingIslands costs ~10x SurfaceWorld). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016dhxM43dnWvUu2B5Ph1iG1
77 lines
10 KiB
Markdown
77 lines
10 KiB
Markdown
# R19 — why FloatingIslands costs about 10×
|
||
|
||
## Log evidence
|
||
|
||
The closest same-view comparison is the unprofiled W12 pair in the L28 logs: [FloatingIslands](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/linux28-plain-baseline-floating-islands-l27-p1.log:30>) and [SurfaceWorld](</home/jahni/VoxelM/Plugins/VoxelForge/Saved/Linux/linux28-plain-baseline-surface-world-l27-p1.log:24>). Both generate **2,370 tiles**, including **960 full-detail tiles**.
|
||
|
||
| Measure | FloatingIslands | SurfaceWorld |
|
||
|---|---:|---:|
|
||
| Plan preparation | 222 ms | 41 ms |
|
||
| Shape build | 0.891 s | 0.396 s |
|
||
| First tile ready | 1.280 s | 0.471 s |
|
||
| Near neighborhood ready | 1.556 s | 0.486 s |
|
||
| Whole view ready | 18.971 s | 1.867 s |
|
||
| Full-detail meshing worker sum | 138.139 s | 2.872 s |
|
||
| Full-detail classification worker sum | 98 ms | 9 ms |
|
||
|
||
The shape builds have the same 138.2 million nodes and 18,420 primitives. FI’s extra shape time is mostly the surface-band stage (679 ms vs 209 ms); it does not explain the roughly 17 seconds of extra whole-view time. Later five-pair timings also retain about a 10× gap: 16.543 s FI vs 1.530 s SW ([L30 report](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Linux30/REPORT.md:40>)).
|
||
|
||
Per-LOD worker sums are aggregate worker time, **not wall time**:
|
||
|
||
| LOD | Tiles, both | FI worker sum | SW worker sum |
|
||
|---:|---:|---:|---:|
|
||
| 0 | 512 | 66.31 s | 1.98 s |
|
||
| 1 | 448 | 72.76 s | 1.09 s |
|
||
| 2 | 320 | 4.60 s | 1.26 s |
|
||
| 3 | 208 | 3.81 s | 1.29 s |
|
||
| 4 | 240 | 3.21 s | 2.69 s |
|
||
| 5 | 144 | 1.14 s | 1.12 s |
|
||
| 6 | 96 | 3.40 s | 2.78 s |
|
||
| 7 | 96 | 8.98 s | 1.25 s |
|
||
| 8 | 306 | 48.43 s | 3.28 s |
|
||
|
||
LOD0–1 accounts for most of the gap: its meshing-exclusive worker time is 138.13 s FI vs 2.87 s SW. LOD7–8 adds another large difference: 57.41 s vs 4.53 s total worker time. FI’s LOD8 log also reports 21.27 s of `column_eval_exclusive_ms`, vs 0.57 s for SW. That counter measures Heightfield2D column computation, **not** the FI island-column cache; the existing baseline logs do not split far-shell work finely enough to assign that cost further.
|
||
|
||
FI is mostly air by design, but the logs do not count whole-view empty meshes. They do show FI with **zero whole-tile skips** and **25,536 unknown boxes** in the timed run. A separate L9 proof audit reports **21,504 FI fallback/unknown blocks and zero checked blocks**; SW checked 26,977 blocks / 35.9 million samples with zero violations ([Linux28 proof summary](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Linux28/REPORT.md:79>), [Linux25 summary](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Linux25/REPORT.md:29>)). So the measured problem is clear: FI’s air is not being cheaply certified and skipped. The exact whole-view empty-tile count still needs `--mesh-coverage`.
|
||
|
||
## Cost model
|
||
|
||
- `FloatingIslandFieldV1::interval` returns unknown whenever a box intersects any island or connector influence AABB; it proves air only outside all those bounds ([`FloatingIslandsInternal.h:interval`](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/FloatingIslandsInternal.h:2099>), [`ShapeWorldInternal.h:ClassifyBoxDetailed`](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/ShapeWorldInternal.h:4919>)). Broad bounds therefore leave many actual-air boxes ambiguous.
|
||
- The owner plan has four islands. `buildFeatureTileList` disables candidate evaluation for plans of four or fewer, so the standard run does not use its per-tile group bounds to prune those island evaluations ([`FloatingIslandsInternal.h:buildFeatureTileList`](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/FloatingIslandsInternal.h:1925>), [`WorldAssemblerInternal.h:find`](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/WorldAssemblerInternal.h:33>)). On the current geometry-v2+ path, each island evaluates five root lobes; four islands mean up to 20 root SDF evaluations per field query, plus connector work ([`IslandDensity` / `FieldDensity`](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/FloatingIslandsInternal.h:711>).
|
||
- There is also avoidable repeated work: `DensityAtLatticeX8` calls `NativeFloatingIslandDensityAt` to detect an FI lane, then calls `DensityAtLattice` for each lane, which evaluates the native FI field again. Reusing the preflight result could remove a duplicate evaluation for lanes inside the FI field ([`DensityAtLatticeX8`](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/ShapeWorldInternal.h:3100>), [mesher call site](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Source/VoxelForge/Private/VoxelMarchingCubesMesher.cpp:1289>)).
|
||
- The native-only shortcut is SurfaceWorld-only and limited to LOD0. FI is not eligible, but the timed run reports zero shape-free desired tiles for both recipes, so this is not the main cause of this run’s gap ([`NativeOnlyBoundsForTile` / `isTileShapeFree`](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/VoxelForgeCore.cpp:1098>)).
|
||
- Far work is a real second target: FI’s island plan prevents the native-surface-horizon shortcut from skipping far-shell repair at LOD7+, while ground/cap refinement also runs for LOD4+. The static run’s `--far-horizon-lod8-step=0` does not remove those paths ([`generateTile`](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/VoxelForgeCore.cpp:1960>)). Profile the shell and column sub-stages before attributing the LOD8 cost more narrowly.
|
||
- Page proofs are not on the static benchmark path: it has no region crossing. Existing page-route audits pass, but they do not explain the static whole-view timing ([`compileTileRegion`](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Core/src/VoxelForgeCore.cpp:1487>), [Research11](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Research11/REPORT.md:9>)).
|
||
|
||
## Ranked work
|
||
|
||
1. **Tight conservative interval bounds, then coarse-to-fine proofs.** Certify empty air blocks outside actual island, helix, column, floor, ceiling and band support; refine only boxes whose bounds cross zero. This has the largest potential gain because it can avoid meshing air. Proof soundness is the main risk: preserve exact sampling for mixed boxes and validate proof audits, appearance and hashes.
|
||
2. **Reuse the X8 FI preflight samples.** This is a direct source-level duplication and should be a lower-risk exact-output optimization. It can approach a 2× reduction in FI field work on affected lanes, but cannot by itself reach 1 s.
|
||
3. **Use per-tile island-group pruning; add a BVH if plans grow.** First measure the existing group-bound path that the four-island setting currently disables. A new BVH is more useful as island/connector counts rise; for four islands, test the existing certificates first.
|
||
4. **Profile and simplify LOD7–8 far-shell work.** It may save seconds, but cannot close the full 10× gap alone; changing LOD8 representation also risks visible horizon changes.
|
||
5. **Measure before adding caches.** The shared XY column cache is already present. L7 showed a 19% SW whole-view improvement, while L29’s cache experiment did not improve cost; neither establishes a comparable FI gain ([L7 report](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Research/WorldAssemblerM3/Linux7/REPORT.md:40>)).
|
||
6. **GPU later.** First remove redundant field work and skip proven air. GPU work adds dispatch, transfer and exact-parity costs without fixing loose bounds.
|
||
|
||
## Builder measurement plan
|
||
|
||
Run five fresh-process W12 timing pairs, alternating recipes, without hashing or profiling:
|
||
|
||
```sh
|
||
taskset -c 0-11 env LP_NUM_THREADS=12 <headless-binary> \
|
||
--world-assembler-prototype --stream-benchmark --stream-pipeline \
|
||
--force-generate --clip-radius=3 --max-clip-level=8 \
|
||
--far-horizon-lod8-step=0 --workers=12 --recipe=floating-islands \
|
||
Standalone/data/owner_world.json
|
||
```
|
||
|
||
Repeat with `--recipe=surface-world`. Then profile each recipe separately with `--profile-lod-work --mesh-coverage`; compare per-LOD density samples, MC grid/cell/gradient/interpolation work, shell calls, ground/cap columns, and non-empty mesh tiles. Profiling adds overhead, so use those runs for attribution, not headline timings. The headless parser has no generic `--profile` flag; the relevant switch is `--profile-lod-work` ([`StreamBenchmarkHeadless.cpp`](</home/jahni/VoxelM/Plugins/VoxelForge/Standalone/Source/StreamBenchmarkHeadless.cpp:869>)). Heightfield column counters do not expose FI’s `IslandColumnCache` hits; use the stack sample or add a focused diagnostic for island-cache hits/misses and root/connector evaluations if needed.
|
||
|
||
For proof coverage, rerun without `--force-generate` and add `--audit-uniform-block-proofs --mesh-coverage`; `--force-generate` disables the block audit. For travel, add `--camera-step=8,0,0` and then `--camera-step=24,0,0`, with `--profile-lod-work`. Compare entering-tile count, completion count, wall time, per-LOD work and queue backlog. Existing moving output is aggregate; smoothness also needs per-entering-tile queue wait and submit-to-complete p50/p95 latency.
|
||
|
||
For hotspot stacks, run the same unprofiled FI and SW commands under `perf record -F 99 -g --call-graph dwarf`, then inspect with `perf report --stdio --sort symbol`. Treat this as hotspot evidence, not a timing comparison; `perf-record(1)` documents the call-graph modes ([manual](https://man7.org/linux/man-pages/man1/perf-record.1.html)).
|
||
|
||
## What ≤1 s requires
|
||
|
||
FI needs roughly a **94% wall-time reduction** from 16–18 s; the 12-worker LOD totals in the reference log are about 213 worker-seconds, versus roughly 12 worker-seconds for an ideal one-second budget. SW also needs about a 40% reduction from the owner’s 1.7–1.8 s. A cold FI shape build alone took 0.89 s in the reference run, so strict sub-second whole-view generation also requires reducing or overlapping shape work.
|
||
|
||
For VR and fast travel, measure the near ring and newly entering tiles separately from completion of all 2,370 view tiles. Prioritize nearby work and let far LODs refine asynchronously; validate 8 m and 24 m movement, deterministic hashes across worker/compiler configurations, and tail tile latency. No edits, builds or binaries were run for this report. |