Repository navigation
Conversation
jonit-dev
added a commit
that referenced
this pull request
Oct 12, 2026
Owner order 2026-10-12: one PRD and one PR (#493) for the whole epic. docs/PRDs/performance/PRD-573-unreal-class-performance-in-release-cycles.md replaces the epic folder (README, ROADMAP, PRD-573..578). Phases are the release cycles v1..v5, each with its KPI and stability gate as boxes; v1 phases are the slices from the slice plan (0 charter, ticked; 0b CI scope; 1 core fixes; 2a..8) plus the scorecard. No inbound links existed.
This was referenced Oct 12, 2026
jonit-dev
marked this pull request as draft
October 12, 2026 04:32
Contributor
Author
Contributor
Author
PRD-573 v1.11 step 3: host projection (visual judge: PASS)The native renderer batches the source scene itself; core's JS mirror is skipped. R5@4096 projection phase 8.0 → 0.57 ms; thread CPU without present legacy 12.87 ms vs native 7.65 ms (rounds 1.63×, 2.26×, 1.90×, host loaded).
Picture identical BEFORE vs AFTER (judge PASS, 2 runs). Open before any KPI claim: a fairness audit of the 21k-triangle gap vs legacy. |
…er-frame record work On the native player core's beforeRender restored its projected cull before the C++ draw ran, so sub-pixel meshes were hidden and shown again without effect. The player now holds the restore until its draw ends. Reflection passes skip skeletons the main pass already posed; a nested mesh finds its record by object id; a mesh outside every frustum keeps its record and builds nothing; a keyframe track whose keyframes are all equal reads its first keyframe. Tier-1 Midway desktop flights (one flight each, last 1,000 frames, parity PASS): main-thread instructions per frame 22,899 K (winner) -> 21,068 K (-8.0%). Tier 2 (three isolated pairs and visual judge) still owed. Five native-engine ctests (animation mixer/events/property tracks, render_skinned, skinned_crowd_cpu) fail on HEAD as well; not caused by this change.
…hread With a GPU thread, GpuResources::writeTexture copied every changed HUD frame (a full-screen RGBA image) into a new vector on the main thread before posting the queue write. Midway's HUD changes every frame, so that copy and its allocation were about 4% of the main thread's cycles. The overlay upload now posts the web view's own pixels: a UI frame stays valid until the next uiOverlayFrame call, which the player makes only after the GPU thread's wait. The warm-batches ctest now bounds record builds by one per cube: since the frustum early-out a cube no camera has held builds no record. Tier 1 (one Midway desktop flight, last 1,000 frames, parity PASS): 21,068 K -> 20,845 K main-thread instructions per frame (-1.1%; memcpy is few instructions per byte, so cycles fall more). Full engine ctest with all test targets built: 388/397; the 9 failures are labelled known-red/perf or the pre-existing target_graph check.
…GPU thread before UI detach TN_PLAYER_FRAME gains cpuFrameKCycles beside cpuFrameKInstructions, over the same window with the same present exclusion, and the Midway dashboard reports its median. Instructions undercount memory-bound work (one rep movsb moves kilobytes; a cache miss retires nothing), so a cut that removes copies or misses shows in cycles, not in instructions. At shutdown the player now waits for the GPU thread before detaching the UI: a posted overlay upload reads the UI frame that detaching frees. Checks: native_engine_player and animation ctests 35/35; midway-dashboard spec 40/40.
Exclude incompatible historical CPU references, parse successful runner reports, and prove browser flag forwarding. Restore the unchanged engine after the shared-seek candidate fails its second instruction probe. Add the missing existing WASM boot workspace lock importer so frozen installs succeed.
Add private TRS write tracking and sticky fallback for raw aliases, matrix views and numeric address borrows; admit fresh V8 model clones and cover native mutation paths. No cache consumes metadata yet and no performance win or AC3 completion is claimed. Validation: five focused V8 math/matrix/GC cases pass; native-writer focused checks 11/11; numeric-address checks 6/6; final alias refinements rerun js_math_views/native_matrix_world successfully. Focused Biome passes with two existing warnings. Physics runtime and new-player flight unverified. Internal _a/_o descriptor replacement/deletion now rejects; normal assignment and raw array writes remain supported.
jonit-dev
marked this pull request as draft
October 16, 2026 01:54
…priteNodeMaterial (PRD-620) - SpriteNodeMaterial takes node slots (positionNode, colorNode, opacityNode...) on the V8 adapter, plus scaleNode and rotationNode, which the sprite program lowers (scale over the model scale, rotation over the material's). - Loop gets a node start and a numeric update step (condition "<"): the particle bounds reduction strides by LANES. - uniform(value, "uint") makes a typed uniform; mod(vec2, float) widens the scalar; compute nodes carry isComputeNode. - MaterialNodes grew two slots: RenderDatabase's graph root list now follows pointers() with a static_assert. - catalog.json gains the CatmullRomCurve3.computeFrenetFrames member the registry already bound. Tests: player-compute-ops (sprite scale/rotation pixel rows, stepped loop, typed uniform, mod) and storage.spec.ts.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.







One PRD and one PR for the whole Unreal-class performance epic (owner order, 2026-10-12).
PRD:
docs/PRDs/performance/PRD-573-unreal-class-performance-in-release-cycles.mdengine: "native"), legacy stays the default.In this PR so far:
fc261bbd1charter amendment: one opt-in C++ engine behind the Three.js API (was docs(charter): admit one opt-in C++ engine behind the Three.js API #494, closed into this PR). Phase v1 slice 0 is ticked.93656da00the epic folded into one PRD. The olddocs/PRDs/unreal-class-performance/folder (README, ROADMAP, PRD-574..578) is removed.Gates run:
pnpm check:docsexit 0; prose lane 244/244 tests passed;pnpm prd:progress1/26 phases, 3/60 boxes.Owner waiver: this PRD has 26 phases, over the 3-phase limit, because the owner asked for one PRD for the epic.
Supersedes #438 and #494.
Snow Heightfield validation (2026-10-16)
Fresh read-only judge: NEUTRAL in both native and both browser comparisons; no visible regression. Native pair 2 differs by one simulation tick, limiting exact contact-state equivalence. Four native runs passed eight logical assertions plus the separately evaluated unchanged pixel guard; four browser runs passed the original footsteps scenario.
Five valid hardware pairs reduced render P50 by 31.3–33.6 ms, exceeding the measured 8.0 ms A/A noise band. The original tail-latency gate still fails; private Xvfb does not qualify release FPS or end-to-end performance. Focused repaired template contracts: 119/119 passed. Full template/native matrix and release qualification remain open.
Raw capture hashes.