Skip to content

Draw the room before starting the first lighting probe - #292

Open
ctoth wants to merge 1 commit into
masterfrom
perf/room-first-paint
Open

ctoth wants to merge 1 commit into
masterfrom
perf/room-first-paint

Conversation

@ctoth

@ctoth ctoth commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

The live room used to queue its first probe during scene construction. That probe could occupy the main thread before the first camera view was drawn. The room now captures its initial environment, draws the WebGL scene and labels, then requests the first probe for a subsequent animation frame. A superseded room only starts baking if it was drawn. The layout preview still starts the bake immediately.

Measured with the eight-person fixture at 1080p in headless Edge on a GTX 1050 Ti. Each value is the median of three trials. A repeat entry opens a second page in the same browser.

Milliseconds from mount, except key delay Fresh master Fresh PR Repeat master Repeat PR
First contentful paint 1564 1197 359 346
Worst key dispatch delay 892 572 165 164
Full lighting complete 4344 4384 2940 3291

All six PR entries finished drawing before the first probe began. The timing tradeoff was most pronounced on repeat entry, where full lighting completed 351 ms later in the median trial.

The component and bake tests cover draw order, room replacement before a draw, idempotent bake start, and disposal. The browser lighting test checks the completed bake through the explicit start method.

This branch has not been deployed

No deployments
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