Skip to content

Decisions, ADRs & Investigations ​

Key Engineering Decisions ​

DecisionChoice KeptRejected Alternative & RationaleSource Anchor
ThinLTOWASM_ENABLE_LTO=OFFThinLTO caused multi-threaded WebGL2 shader startup hangsdeps/ppsspp-wasm/CMakeLists.txt
Main loop schedulingrequestAnimationFrame (60)Fixed 16 ms timers drifted against vsync and contributed to CI startup stallsdeps/ppsspp-wasm/CMakeLists.txt
Memory arenaUSE_NO_MMAP=ON + mimallocBrowser WASM linear memory lacks host mmap semanticswasm-page/tests/no-mmap-arena.cpp
ISO access boundaryZero-byte MEMFS stub (ErrnoError(29)) + 8 MiB BrowserFileLoaderFull ISO buffering hits 32-bit memory limits; main-thread ReadAt returns 0 to prevent sync-proxy deadlocksBrowserFileLoader.cpp, browser-files.js
Savestate ZSTD input1 MiB chunked decompressionWhole-buffer allocation spiked WASM memory on large statesUPSTREAM.md, state-zstd-input.cpp
Multiplayer UI visibilityLOCAL_ONLY = truePrevents exposing disconnected Netplay/Drive tabs when no public backend is configuredwasm-page/public/ppsspp-runtime.js:31
Diagnostic release gateReject WASM_FRAME_TIMING / WASM_IR_BLOCK_PROFILE by defaultStops high-overhead probes from shipping unless --allow-diagnostics is passedscripts/ci/prepare-deploy.mjs

Migrated Investigation Notes ​

  • Audio pump converged to 8 ms cadence: Controlled local comparisons between 2 ms and 8 ms timer polling showed that keeping the AudioWorklet's >= 70 ms hardware-clock lookahead gate lets setInterval(pump, 8) cut main-thread wakeups without introducing extra audio or drops.
  • CI vs active workflows: Active GitHub workflows in .github/workflows/ are ci.yml, deploy.yml (EdgeOne Makers), and docs-pages.yml (GitHub Pages); optional Ad Hoc relay deployment lives independently under deploy/relay/.
  • Verification: Run pnpm --dir wasm-page test, python3 -m unittest discover -s server/player-tests -v, and python3 -m unittest discover -s server/tests -v to exercise JS, protocol, and server guards locally without rebuilding WASM C++.