To get optimal performance from the debugger, consider the following
points:
Expression Evaluations
- Complex expressions take longer to evaluate than simple expressions. Performance
is only an issue when you are monitoring an expression, since the expression
must be evaluated each time the debugger stops.
- The default representation of monitors affect the performance of expression
evaluation:
- Representing character pointers, arrays, and character arrays as hexadecimal
pointers gives the best performance.
- Representing a character array as a string is faster than representing
it as an array.
- Evaluating all of the elements of a large array takes longer than evaluating
single elements. Use the Monitors view to evaluate a single element.
Step Performance
Step performance is affected by
the number of enabled variables or expressions in the monitors and the complexity
of the expression. Step performance can be improved by:
- Disabling or deleting expressions that no longer need to be monitored.
- Displaying only single elements of an array.
- After following a chain of pointers to a variable, disabling the pointers
used and leaving only the variable active in the monitor.
- Completely collapsing the threads in the Debug view.
Searching for a string in Source view or Listing view
String
searches can be made faster by the following:
- Keeping the source file on the workstation.
- Searching the Listing view instead of a Source view that is on the IBM® i.
Using the Optional Parameters entry fields on line breakpoints
Values
specified for these options will significantly slow down your program, because
the debugger must stop for the breakpoint and evaluate the From/To/Every clause
each time. Even though you do not see the program stop, it is in fact stopping
so that the debugger can evaluate the stop conditions.
If possible,
an alternative is to set a conditional breakpoint by specifying an expression.
Avoid setting a large number of watches
When a watch
is set, the system checks after each instruction whether the value of the
watched variable or expression has changed. Setting many watches may lead
to slower performance.