Skip to content

The runtime holds only the manifest pages its view needs, and the open world loads #751

Description

@pasquelin

Current scope — narrowed at claim time by CTO newest, 29 September

Compiler prerequisites #750, #762 and #792 are closed and delivered. This issue owns the runtime's view-bounded manifest lifetime on WebGL2 and the open-world loading proof.

Narrowed at claim time (29 Sept, CTO newest), before any code:

Why

Split from #404 (#483 rule 6). The runtime holds the whole manifest, so its memory grows with the world and the open world's tab crashes while reading it (JS heap 260 MB).

To do

  • Core pages named by the format: the compiler writes the meshPages the core node table needs into the scene tables (format version bump, worlds re-cooked).
  • The manifest held by the view (WebGL2): the runtime reads only the manifest root, head and core pages at open, through the one HTTP loader (fetchVerified, Audit of #438: a second scene model in the engine, witness code and Three.js wording left in the package #457), then fetches and keeps only the manifest pages the view's cells need (each cell's meshPages, counted per held cell), and drops them with the cells.
  • WebGL2 mount and unmount: the primitives a page brings mount into the open WebGL2 session (mountPlacements) and unmount with the cell, with no session reopen.
  • Bounds without every primitive: the scene opens while meshes have no primitive yet (no AUTONOMOUS_ASSOCIATION_MISSING).
  • WebGPU unchanged: WebGPU keeps the full manifest read, with no image change, until Draw-slot tables grow in place when the geometry pool grows above its ceiling #216.
  • The open world loads: trillion3d.commit in pasquelin/Trillion3D-openworld is bumped to this pull request's head in a pull request opened alongside it, and the world re-cooked, so the published /openworld/ reads its world without crashing the tab.

Code context

sdk-core/src/manifest/paged.ts, sdk-browser/src/scene/manifestLoad.ts, sdk-core/src/scene/core/tablePartition.ts, scene/partition/cells.ts, worldRuntime.ts, placement/autonomousPlacements.ts, world/scene/scene.ts, the compiler's scene tables.

Proof

Acceptance runs image/correctness checks; the measurer records memory/timing. Record the exact engine revision used.

Links

Parent #483. Split from #404. Delivered compiler prerequisites: #750, #762, #792. Moved out: #23's runtime items to #483 (future B1, B2); WebGPU growth to #216.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggeometryVirtualized geometry, DAG, cluster selection, rasterto auditMerged; waiting for the recette's image proof and re-readto measureMerged; waiting for the recette's timing🔴 criticalCritical priority: rendering correctness and FPS

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions