This article explains the impact of -g on performance when creating animatable executables.
Problem:
In order to have the ability to animate executable object formats such as .gnt or .so or executable, the "-g" flag must have been specified on the "cob" command when the objects were created. However, will the "-g" flag cause objects to run more slowly? Can you place the executables into production on a busy server, and run most often without animating, still preserving the ability to animate if necessary? And will the performance be acceptable?
Resolution:
When the -g cob flag is specified during the generation of .gnt or shared library or executable files, the extra debugging information is saved in the separate ".idy" file. The resulting executable does not increase in size. In actual fact, there is a small increase that is not substantial.
With the debugging information saved separately in .idy files, the executables can be placed into production and will run with performance very nearly equal to their performance without the -g flag. Then if necessary the application can be animated, or if it abends and produces a core, the core (in the presence of the .idy files) can be animated.