While a non-AR ARView is on screen and rendering, await Entity(contentsOf:) takes about 26 s to load a 4.5 MB USDZ with 300 textured meshes. The same file loads in about 1.5 s with the synchronous Entity.load(contentsOf:), or with the async API while the view is hidden.
await Entity(contentsOf:), view rendering | 22 to 26 s | 26 s |
Entity.load(contentsOf:), view rendering | 1.6 s | 1.1 to 1.7 s |
await Entity(contentsOf:), view hidden | 1.4 s | 1.3 to 1.5 s |
ModelEntity(contentsOf:) and Entity.loadAsync(contentsOf:) behave the same. A .reality file loads fast either way, and the iOS Simulator doesn't show it.
A Time Profiler trace shows the main thread blocked in re::RenderThread::waitForFramePacing on every frame, so the @MainActor import only advances between frames.
Neither workaround fits loading content into a scene the user is looking at: the sync load blocks the main thread, and hiding the view blanks it.
Filed as FB25340264, with a sample project.