2.5. Remove debugging information

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

Ensure you switch off debugging before releasing your application. For other pre-release checks, see Final release check list.

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 one every second or one every frame.

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.

Note

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

Note

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

Copyright © 2011 ARM. All rights reserved.ARM DUI 0555A
Non-ConfidentialID033111