Skip to content

Cut guest boot latency by reusing PPC modules and batching scheduler work - #21

Merged
matthewcodergamer merged 25 commits into
mainfrom
perf/banjo-boot-throughput
Nov 18, 2026
Merged

matthewcodergamer merged 25 commits into
mainfrom
perf/banjo-boot-throughput

Conversation

@matthewcodergamer

@matthewcodergamer matthewcodergamer commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

What this fixes

The slow path is guest launch/CPU execution, not resolution or a generic request to enable WebGPU. The browser loop repeatedly performs work that can be reused.

Changes

  • Keep one stable guest-call/guest-load import closure backed by the live function registry.
  • Preserve already-instantiated generated guest WebAssembly function instances when the registry grows; instantiate only new or changed records.
  • Preserve CFG continuation slots for unchanged functions and reset only continuations whose owning function was removed/replaced.
  • Include CFG fallback state in registry fast-path invalidation, since it can change independently of the native callable registry revision.
  • Include generated code pointer in compiled-module cache identity to prevent stale reuse when storage changes.
  • Batch up to the configured guest-thread scheduler quantum per browser yield. The modern content path now defaults to four slices rather than one.
  • Cache expensive Xenos shader interpreter/SPIR-V validation by shader hash, and full GPU state snapshots by lightweight GPU activity signatures, so they are not recomputed on every guest slice.
  • Add regression coverage for incremental module instantiation, stable dispatch, scheduler batching, and Xenos inspection signatures.

Validation

CI passed on the current head:

  • Render360 Browser Integration, including Node syntax checks, Xenos signature tests, persistent PPC session tests, and native guest scheduler tests.
  • WebGPU Browser Runtime architecture critic.

These tests use the checked-in bootstrap artifact. No measured FPS or Banjo-Tooie boot-time gain is claimed yet. A Chrome launch benchmark against the rebuilt native bootstrap is still needed to quantify the improvement and confirm the exact gameplay transition.

Scope

This targets repeated host-side work competing with guest execution during boot. It does not change game assets or renderer quality.

@matthewcodergamer
matthewcodergamer merged commit 5cce5b3 into main Nov 18, 2026
2 checks passed
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