Repository navigation
feat: image loading benchmark (1/5/25/100 images, 5 warmups, unique local URLs) - #65
Merged
Merged
Conversation
…ocal URLs) Add an image-loading benchmark that runs in the full suite right after the rectangle FPS test (and standalone via 'npm run images' / 'node index.js --images'). Each framework loads 1, 5, 25 and 100 images per slice with 5 warmup loads and 5 measured loads per count, under the same 6x CPU throttling as the other benchmarks. Every load uses a unique URL (query suffix) so no texture or HTTP cache can serve a warm entry; images are local PNGs from renderer/examples/assets copied to shared/images/ and served from dist/images/ by the runner, so there is no internet variance. Loaded images render on a non-overlapping grid across the 1920x1080 app area (all framework canvases aligned to 1920x1080; ftl canvas was 1900px). buildImageLayout throws if any item would fall out of bounds, since renderers cull OOB content and FTL never loads OOB textures. FTL places all images on zIndex 0 so they share one z-bucket and batch into a single draw call. The exit point per load is the framework's own texture-loaded event: texture 'loaded' (Lightning 3), texture signals.loaded (FTL), element txLoaded (Lightning 2), @loaded (Blits). Results are saved to results/images_<timestamp>.json and added to the shared HTML report as an 'Image loading (ms, lower is better)' section, reported separately from the weighted operation score like rectangles/startup. Wired into all framework entries with a #images route (renderer*, ftl*, lightning2*, blits). Adds tests/imageBenchmark.test.js and tests/imageResults.test.js (21 tests total pass).
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.
Adds an image-loading benchmark to the suite, running in the full run right after the rectangle FPS test (standalone:
npm run images/node index.js --images).loaded(L3),signals.loaded(FTL),txLoaded(L2),@loaded(Blits)#imagesroute (renderer*, ftl*, lightning2*, blits)results/images_<timestamp>.json+ an 'Image loading (ms, lower is better)' section in the shared HTML report, kept out of the weighted score like rectangles/startuptests/imageBenchmark.test.js,tests/imageResults.test.js(21 tests pass)Smoke-verified headless (Chromium 153, 6x throttle), e.g. count=100: ftl ~703ms, renderer-local ~864-950ms, blits ~751ms, lightning2 ~712-872ms, renderer ~1025ms.