Repository navigation
Faster race loading, smoother menu while cars load - #20
Merged
Merged
Conversation
- A race waits for the player's car and five more (rivals pick their look from the loaded cars), not all nine. Further cars don't start while the race screen is open: merging a model runs on the main thread (up to 0.6 s) and the end of Entity(contentsOf:) also blocks it. - Cars load two at a time, player's car first, then smallest files first. - Mesh merge and baked-AO application run in ~6 ms slices with a pause for a frame (MainThreadSlices). - Frame-time log for the menu/garage turntable; race hitch log also covers the first 0.5 s after the scene is revealed. Simulator iPad M5 iOS 27, A/B against main: - cold start into a race: 8.3-8.9 s -> 7.1-7.8 s, memory in race -48 MB, longest race frame still <= 50 ms - menu/garage in the first 10 s: freezes over 100 ms 11 -> 4-7, longest 740 -> 440 ms (now under the splash), total stall time -30% Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Change
Entity(contentsOf:)(~90 ms) run on the main thread and caused hitches at the start of the race. The rest load after leaving the race screen. On the results screen loading froze the screen for 0.5–0.7 s, so it stays held there too.MainThreadSlices: mesh merge and applying baked AO run in ~6 ms slices with a 1 ms pause for a frame. In one go they blocked the main thread for 40–510 ms and 54–250 ms per car, and the turntable in the menu stopped.Not changed: the ~0.5 s hitch when post-processing starts, under the loading screen. Our pipelines are ready at launch (0.01 s); the time is spent inside RealityKit before it calls our code.
Measurement (iPad M5 iOS 27 simulator, A/B alternating against main)
Tests
🤖 Generated with Claude Code