Previous Topic: Enhanced Array Support Restrictions

Next Topic: Generated Source

Performance Considerations for Multiple-Instance Array Parameters

When using multiple-instance array parameters (MIAPs), the following performance-related considerations apply:

General performance considerations when using MIAPs

Even though a MIAP can have many instances, only a single pointer is passed by the operating system to the program, as is the case with a non-MIAP parameter. Therefore, in terms purely of the parameter being passed as a normal parameter or as a MIAP, there is no additional performance hit to using MIAPs.

Performance considerations in programs that use MIAPs

Any Neither parameters that are passed to a function are explicitly initialized in the ZZINIT subroutine in that function. In the case of a MIAP parameter containing Neither subfields, this initialization occurs for every field, in every element in the MIAP.

Performance considerations in programs that call other programs that use MIAPs

When one program calls another and passes a structure parameter (RCD or KEY), CA 2E generates code in the calling program to initialize the intermediate structures used to pass the parameters to the called program, to load those structures from the variables specified in the Action Diagram and to unload those structures into the return variables. This code is generated whether the parameter is defined as a MIAP or as a normal parameter.

When the parameter is defined as a MIAPs

To ensure the best possible performance when using MIAPs, follow these guidelines as closely as you can

  1. All subfields within a MIAP should be defined with the same usage (I, O or B).
  2. MIAP subfields with a usage of Neither should be avoided.
  3. ISO-type MIAP subfields should be avoided.