Skip to content

feat: image loading benchmark (1/5/25/100 images, 5 warmups, unique local URLs) - #65

Merged
wouterlucas merged 1 commit into
mainfrom
feat/image-loading-benchmark
Dec 1, 2026
Merged

wouterlucas merged 1 commit into
mainfrom
feat/image-loading-benchmark

Conversation

@wouterlucas

Copy link
Copy Markdown
Contributor

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).

  • Loads 1, 5, 25 and 100 images per slice: 5 warmups + 5 measured loads per count, 6x CPU throttling, fresh browser per framework
  • Unique URL per load (query suffix) so no texture/HTTP cache hits; local PNGs from renderer/examples/assets served from dist/images/ (no internet variance)
  • Images render on a non-overlapping, in-bounds grid across the 1920x1080 app area (all canvases aligned to 1920x1080; OOB items throw since renderers cull OOB); FTL uses one z-layer (zIndex 0) so images batch into a single z-bucket draw call
  • Exit point is the framework's own load event: texture loaded (L3), signals.loaded (FTL), txLoaded (L2), @loaded (Blits)
  • Wired into all framework entries via a #images route (renderer*, ftl*, lightning2*, blits)
  • Results: 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/startup
  • Tests: tests/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.

…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).
@wouterlucas
wouterlucas merged commit def4578 into main Dec 1, 2026
2 checks passed
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