Repository navigation
Rectangle FPS benchmark: 4k/8k/16k counts, 16k cap for L2/L3 - #64
Merged
Merged
Conversation
… L2/L3 Adds the moving-rectangle FPS benchmark (node index.js --rectangles / npm run rectangles): shared seeded scene + FPS sampler, per-framework adapters, a runner that isolates every framework/count slice in a fresh browser process under 6x CPU throttling, RAF cross-check for L2, and JSON/HTML reporting alongside the existing results. Default counts are now 4,000 / 8,000 / 16,000 (override with RECTANGLE_COUNTS). The Lightning 2 variants and the L3 renderer variants reject counts above 16,000 before creating elements (16-bit quad indices wrap past 16,384 slots); such slices are reported as unsupported 0-FPS failures instead of measuring wrapped geometry.
wouterlucas
force-pushed
the
feat/rectangle-fps-benchmark
branch
from
November 25, 2026 22:08
4cd0915 to
6e27c66
Compare
The WebGL FTL rectangle slice now renders with FTL's lightweight OutlineShader (hard-edged, instanced, alphaInBleed path) instead of BorderShader, and moves rectangles via el.setPosition(x, y) so the position-only world-state fast path is exercised. Falls back to x=/dirty() when setPosition is unavailable (canvas/bitmap variants).
The overview test asserted the escaped HTML contains no raw <script> tag with a case-sensitive regex, which CodeQL flags as a bad HTML filtering regexp (uppercase <SCRIPT> would bypass it). Assert with /i and add an uppercase <SCRIPT> payload to the fixture to prove escaping handles it.
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.
What
Adds the moving-rectangle FPS benchmark to the suite (
node index.js --rectangles/npm run rectangles):shared/rectangleBenchmark.js) and per-framework adapters (shared/rectanglePlatformAdapters.js)testrunner/runRectangles.js) isolating every framework/count slice in a fresh browser process under 6x CPU throttling, with partial results saved per slicerafFps/rafChecks), FPSMeter-stylemeterFpsand frame-pacing stats in the JSON, plus an FPS section in the HTML overviewtests/(node --test tests/rectangleBenchmark.test.js tests/rectangleResults.test.js)Count changes
RECTANGLE_COUNTS.Notes
renderer-localexperiment are included in this PR; both remain local-only..envnow defaults to the WebGL-only set (canvas/bitmap/core variants off).