You copied the Doc URL to your clipboard.

2.2.4. Remove debugging information

Gathering debugging information is useful for correcting errors, but it requires memory and compute resources. The process of gathering debugging information typically has a negative impact on performance.

Ensure you switch off debugging before releasing your application. Only leave debugging on if you require debugging capability in your application.

For other pre-release checks, see Final release checklist.

Use minimal printf() calls

printf() calls can be very slow. You can prevent them from impacting application performance by only displaying the frame rate after a relatively large number of frames. For example, make a printf() call every 100 frames, not every frame or every second frame.

If you are using logcat on Android OS you can use more calls because it has a minimal impact on performance.

Do not call glGetError() more than one time per frame

Every call to glGetError() takes time to process. A large number of these per frame consumes sufficient compute resources to limit the frame rate of the application. Ensure you make no more than one glGetError() call per frame.

You can use #define macros to build the debug code for development builds and remove it for release builds.


If the application is gathering debugging information while you are taking performance measurements, these measurements are likely to be inaccurate.

Was this page helpful? Yes No