Skip to content

perf: reduce board overhead and bound engine loading - #30

Merged
renyijiu merged 3 commits into
mainfrom
codex/optimize-board-performance
Oct 1, 2026
Merged

renyijiu merged 3 commits into
mainfrom
codex/optimize-board-performance

Conversation

@renyijiu

@renyijiu renyijiu commented Sep 22, 2026 •

Copy link
Copy Markdown
Owner

Summary

Reduce the work needed to load and animate the board, and let Master engine startup fail and retry when an asset body stalls instead of waiting indefinitely.

Measurement Before After
React updates per stationary piece during opening move a3 → a4, low quality 11 2
Initial game JavaScript, gzip 459.9 KiB 437.4 KiB

High quality preloads optional bloom on the first action and enables it during captures. Low and medium quality avoid that download. Frame telemetry retains slow active frames above 250 ms while excluding idle gaps; CI reuses the production build and checks rendering regressions.

Validation

  • npm run typecheck
  • npm run lint
  • Relevant unit/runtime tests
  • Production build or browser smoke when release behavior changes
  • npm run test:bundle when client imports or dependencies change

Commands and results:

  • npm run format:check, npm run typecheck, npm run lint — passed.
  • npm run test:unit and npm run test:runtime — 350 tests passed, including stalled manifest/runtime bodies, abort, and retry.
  • npm run test:budget — model, audio, and engine asset validation passed with verified local Git LFS content.
  • npm test and npm run test:bundle — production build, 4 HTML checks, 3 budget tests, and all 4 optional import boundaries passed.
  • npm run test:e2e:built — 12 production checks passed, including a real Master engine move, restore, capture, undo, and local two-player turns. The opt-in 100-opening lifecycle test was skipped.
  • tests/e2e/render-work.spec.ts — all 3 checks passed: stationary render counts, high-quality bloom selection, and failed-download fallback. The ambient lifecycle check in resilience.spec.ts passed across 120 browser frames with stable resources and active frame samples.

Measurements and scope are recorded in docs/validation.md.

Visual and asset changes

  • No visual/asset change
  • Screenshots or reviewed baseline diffs attached
  • Git LFS objects are hydrated and tracked correctly
  • Source, license, provenance, manifests, and validators updated

No visual-design or asset-content changes are intended. Rendering and optional-effect loading changed; the browser checks above exercise those paths. No snapshots or provenance updates were needed. Required LFS content was hydrated for validation; committed assets remain unchanged.

Risk

  • Remaining risks or follow-up work: render counts are not an FPS claim; visible-GPU and target-phone FPS were not measured. A cold capture may use base VFX while bloom loads, and failed bloom downloads leave base VFX available. Frame statistics may now report worse values because real slow frames are no longer discarded.
  • Rollback approach: revert the three commits in reverse order; no data migration is involved.

Supply chain and security

  • No dependency, workflow, permission, secret, or third-party provenance change
  • Relevant dependency/license/security impact is documented and reviewed

CI now reuses its existing build and runs the rendering regressions. Dependencies, action pins, permissions, secrets, and third-party provenance are unchanged.

@renyijiu
renyijiu merged commit c1c8a35 into main Oct 1, 2026
4 checks passed
@renyijiu
renyijiu deleted the codex/optimize-board-performance branch October 1, 2026 06:53
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