To reduce the performance impact on your application, all the heavy lifting is moved onto background threads. The main thread does do a bit of work when `context.Update()` is invoked (see [[Raytracing Lifecycle]]), but you shouldn't notice any stutters or FPS drops. The 'heavy' work that runs on background threads includes: - **Preparation** - calculating a bounding volume hierarchy (BVH) for faster raytracing - **Raytracing** - building trails, casting line-of-sight rays (see [[Trail-Based Raytracing]]) - **Analysis** - calculating reverb + occlusion properties The flow is: - 1 background thread runs the Preparation task - Then, N threads run all Raytracing tasks - Then 1 background thread runs the Analysis task On my i7 11700KF with 15 threads dedicated to raytracing and 16 voices: ``` Main thread: 0.118ms Preparation: 0.026ms (1 background thread) Raytracing: 0.343ms (15 background threads) Analysis: 0.593ms (1 background thread) Total background time: 0.963ms ```