fix(all-in-one): build SDF room labels off the main thread #1105

Merged
SakulFlee merged 1 commit from sakulflee/android-async-labels into main 2026-11-11 21:47:14 +00:00 AGit
Owner

Summary

  • Move the shared SDF atlas and room-label mesh generation onto a worker thread.
  • Attach the completed labels from an ECS system a few frames after startup.
  • Re-enable the room labels on Android, which #1066 had temporarily skipped.

The worker takes about 2.3 s on the development machine, but module setup and the first frames no longer wait for it. Scene loading and the DamagedHelmet import queue are reached immediately, and the labels appear once the atlas is ready.

Testing

  • cargo fmt --all -- --check
  • cargo clippy -- -D warnings
  • cargo test --no-fail-fast
  • Ran the all-in-one example under Xvfb. Logs show Built 8 room labels in 2.253169294s on the room-label worker and Attached 8 room labels from the background atlas build, while startup continued past scene loading and helmet import before the build completed.
  • The Xvfb run reported unrelated light-culling pipeline validation errors from the virtual GPU; labels were still built and attached.

Issue

Closes #1072

## Summary - Move the shared SDF atlas and room-label mesh generation onto a worker thread. - Attach the completed labels from an ECS system a few frames after startup. - Re-enable the room labels on Android, which #1066 had temporarily skipped. The worker takes about 2.3 s on the development machine, but module setup and the first frames no longer wait for it. Scene loading and the DamagedHelmet import queue are reached immediately, and the labels appear once the atlas is ready. ## Testing - `cargo fmt --all -- --check` - `cargo clippy -- -D warnings` - `cargo test --no-fail-fast` - Ran the all-in-one example under Xvfb. Logs show `Built 8 room labels in 2.253169294s on the room-label worker` and `Attached 8 room labels from the background atlas build`, while startup continued past scene loading and helmet import before the build completed. - The Xvfb run reported unrelated light-culling pipeline validation errors from the virtual GPU; labels were still built and attached. ## Issue Closes #1072
fix(all-in-one): build SDF room labels off the main thread
Some checks failed
Lint / lint (pull_request) Has been cancelled
PR / test (pull_request) Has been cancelled
Templates / templates (pull_request) Has been cancelled
5c6bdf839a
Move the shared atlas and label mesh generation onto a worker thread and attach the finished labels from a system a few frames after startup. This restores the room labels on Android without blocking module setup or the first frame.
SakulFlee force-pushed sakulflee/android-async-labels from 5c6bdf839a
Some checks failed
Lint / lint (pull_request) Has been cancelled
PR / test (pull_request) Has been cancelled
Templates / templates (pull_request) Has been cancelled
to 6f2e0e2e1e
All checks were successful
PR / test (pull_request) Successful in 3m17s
Lint / lint (pull_request) Successful in 4m13s
Templates / templates (pull_request) Successful in 2m37s
2026-11-11 21:17:20 +00:00
Compare
Sign in to join this conversation.
No description provided.