Improving CPU bound content

Content that is CPU bound fails to hit its target performance due to high software processing demands. There are two causes of CPU boundness: Critical path load and high aggregate load.

Critical path load

High critical path load is caused when a single thread, or a synchronized sequence of multiple threads, creates a bottleneck. It is the most common type of CPU bottleneck found in applications running on multi-core mobile devices. To improve performance, you must reduce the CPU load on this critical path, either by optimizing content to reduce cost or by moving work into threads that can execute in parallel.

High aggregate load

High aggregate load occurs when the total cumulative load of the executing processes and application threads is too high. In this scenario, poor performance is not due to a single thread or critical path, so you must reduce any CPU workload across all threads to improve performance.

Improving render thread performance

High loads can occur when the application rendering thread makes poor use of the native graphics API. Here are some recommended best practices for reducing the CPU cost of rendering operations:

  1. Perform expensive software operations at level load time, not during gameplay. This could include operations such as shader compilation, program linking, large buffer upload, and large texture data upload.
  2. Do not modify buffers or textures that are still referenced by in-flight draw calls, unless you are using MAP_UNSYNCHRONIZED to disable resource dependency tracking.
  3. Large numbers of draw calls are expensive for the CPU to process, so you should aim to reduce the number of draw calls. Refer to the advice page for high draw calls for tips on how to do this.
Previous Next