Skip to content

perf: coordinate visual memory and skip hidden world work - #164

Merged
capz merged 15 commits into
mainfrom
codex/world-memory-visibility
Nov 24, 2026
Merged

capz merged 15 commits into
mainfrom
codex/world-memory-visibility

Conversation

@capz

@capz capz commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner

Unused visual resources consumed MEM1 while concealed geometry and synchronous terrain work added CPU/GPU cost. A saved town with five required species could also stall during startup. Required scenes, the selected player and doorway endpoints now keep their resources while unused models, interiors, floor sources, snow masks and terrain cache yield memory through one allocator-aware admission policy. Concurrent allocation peaks are reserved, required restores run first, cancellation drains before releasing ownership, and before/after-draw opportunities share one 1 ms soft CPU budget.

Fully concealed actors skip pose/submission work; fully covered flat ground and buried markers skip drawing until snow changes. Sparse snow recovery, shared object bins and bounded asynchronous terrain prefetch avoid repeated work. Qualified fox, bunny and giraffe LODs remove 13.7–21.6% of triangles; shared species and visitor cohorts replace atomically. Indoor cache release and warm prefetch are automatic, and both obsolete debug rows are removed while legacy saved bytes remain readable.

The published SDK379.1/Hypercube55.1 dependency chain removes unused source-importer roots (SDK191, engine25). Against the pre-trim candidate 7f5651a, the final DOL uses 787,552 fewer loaded bytes (769.1 KiB); the UI canvas separately saves 110,592 bytes (108 KiB). No managed-heap capacity was cut: maximum-save tests exercise all 6 MiB.

Validation:

  • All selected host, native, asset and backend checks pass. Clean same-commit ISO, standalone Depot app and backend/tools packages pass; the 166-payload NKit round trip preserves the executable and assets.
  • The byte-identical saved-town regression reaches gameplay, completes delivery and passes independent saved-state verification, with zero allocation failures or waiting reservations.
  • Spring terrain acceptance covers real 256px/two-level mips, distance/toggle/reset behavior, native water, legacy/archive restoration, original art and unchanged saves.
  • Final winter acceptance passes repeated physical reclamation/restoration, actual-roster cold-to-warm coverage and an independent restart cycle. Exactly 1 MiB of cache releases per cycle, with the ARAM archive retained and floors restored before the cache. Read-only actor tracing verifies actual locations and excludes absent slots; fallback routing follows wandering actors rather than assuming they occupy their own homes.
  • Native cooked-asset checks cover all six species, eight-instance cohorts, sampled animation correspondence and allocation/rollback bounds. Importer functions fall from 655 to zero in the final linked artifact.

Tests select a 6 m terrain prefetch guard, 24/30 px mesh hysteresis and 48/60 px animation hysteresis. Model demand follows the camera/horizon with 24 m lookahead, narrowing under pressure. Physical GameCube frame-rate gains remain unmeasured. Policy: docs/visual-resource-policy.md.

@capz
capz marked this pull request as ready for review November 24, 2026 12:23
@capz
capz merged commit 4a29bc7 into main Nov 24, 2026
4 of 5 checks passed
@capz
capz deleted the codex/world-memory-visibility branch November 25, 2026 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant