When developing for the Oculus Quest, optimization is critical in creating polished apps that meet customer expectations in terms of quality and Oculus Store requirements. This section contains guides on using some of the performance optimization tools available when developing for the Oculus Quest.
The Oculus Quest’s mobile chipset presents challenges that differ from those present in PC VR development. For example, apps running on Oculus Quest must use fewer draw calls, less complex shaders, and format art assets to compensate. A graphics debugger, like RenderDoc for Oculus, can help locate such optimization opportunities. A profiling tool that lets you look in detail at the GPU pipeline during rendering, such as ovrgpuprofiler, can show when there are render stage timing issues that can affect frame rate and keep your app from peak performance.
In short, performance issues often arise because of the difficulty of maintaining a stable 72 Hz frame rate on the Oculus Quest’s mobile chipset. By using these tools to systematically track down the issues that are causing performance problems and then implementing the necessary optimizations, you can create a significantly better user experience.
You must have your device and development environment configured for Oculus Quest development. If your development environment and device have already been prepared for Oculus development, no further preparation is required.
If you need to prepare a test environment, instructions for device and Android SDK setup will differ depending on how you are developing your app:
|Oculus Developer Hub||Oculus Developer Hub (ODH) is a companion development tool that surfaces a collection of frequently used solutions, such as capturing screenshots and recording video, casting the headset display to a computer, and active notifications for updates.|
It offers an engaging developer experience and accelerates the overall iteration process through simple mechanisms such as connecting the headset wirelessly to the computer and disabling the proximity sensor and Guardian.
|Use ADB with Oculus Mobile Devices||Android Debug Bridge (ADB) is installed with the Android SDK and is a prerequisite to using the other tools in this guide. It is used to establish a connection between a computer and an Android device, as well as other common file tasks.|
|Collect VrApi Logs with Logcat||Logcat is a command-line Android SDK tool that collects system logs. Logcat can be used to retrieve Oculus |
|Monitor Performance with OVR Metrics Tool||OVR Metrics Tool is a tool for analyzing mobile apps that provides a real-time graph overlay of app and device data as well as exportable reports. The OVR Metrics Stats guide defines the data available in OVR Metrics Tool.|
|Configure Android System Properties||Android system properties are system-level configuration options that can be useful for debugging and testing potential changes on a running device.|
|GPU Profiling with ovrgpuprofiler|
|Use GPU Systrace for Render Stage Tracing||GPU Systrace is a modification of the Android SDK Systrace tool that provides render stage information and additional GPU pipeline data.|
|Use RenderDoc for Oculus for GPU Profiling||RenderDoc for Oculus is a fork of RenderDoc for use with Oculus Quest. In addition to RenderDoc’s normal graphics debugging capabilities, this version provides access to low-level GPU profiling data from the Oculus Quest.|
|Use Simpleperf to Monitor CPU Performance at a Per-Function Level||Simpleperf is a kernel-level sampling tool that monitors CPU performance and then generates flame graphs that show what percentage of CPU time is being spent in which functions.|
|Accurately Measure an App’s Per-Frame GPU Cost||Describes some of the available methods to measure how to report the whole frame’s GPU performance, and offers a recommendation on a way that combines logcat VrApi logs with a command that temporarily disables TimeWarp.|
|Using Oculus Debugger for VS Code||Describes how to use Oculus Debugger, a Visual Studio Code extension that is primarily intended for real-time debugging of Unreal Engine apps for Oculus. It fully supports debugging Oculus applications (APK files) and Oculus Native C/C++ binaries.|
|Track GPU Memory Usage with gpumeminfo||Describes how to use gpumeminfo, a low-level CLI tool that developers can use to track the GPU memory usage on a process.|
|Running a Perfetto Trace on Oculus Quest||Describes how to run a trace using Perfetto, a system-wide profiling tool that provides information on system events, such as scheduling activity, in addition to app-level instrumentation for apps that integrate with it.|
|Using AutoDriver to Record Inputs||AutoDriver is a VrApi layer that, when enabled, records user headset, controller, and hand tracking inputs, as well as tracking data. These recorded inputs can then be played back so applications can reuse them for automated testing where user input is required.|