HP 3000 Manuals

Processing Time Optimization [ HP Transact Reference Manual ] MPE/iX 5.0 Documentation


HP Transact Reference Manual

Processing Time Optimization 

The following guidelines can help you improve the efficiency of your
Transact p-code at run-time:

   *   Adjust the WORK= option of the SYSTEM statement to minimize the
       work space recoveries during execution.  The number of work space
       recoveries can be determined by running test mode 101 or 102.
       Adjusting work space size may increase data stack requirements.

   *   Use DEFINE(INTRINSIC) to call system intrinsics whenever possible.
       This construct prevents the Transact processor from using LOADPROC
       dynamically to return the P-label of the intrinsic being called.
       Using DEFINE(INTRINSIC) reduces the overhead of loading the
       Transact program.

   *   Avoid calling many separate user-defined procedures from a
       Transact application.  One LOADPROC is executed per procedure,
       contributing to processing overhead.  If possible, combine all
       user-defined procedures into one procedure and identify the
       procedure to be executed with a control or index parameter.

   *   Avoid using the UNLOAD option of the PROC verb with frequently
       called procedures, since both LOADPROC and UNLOADPROC are called
       each time a procedure is called.

   *   Use the NOLOAD option of the PROC verb for infrequently called
       procedures such as error routines.

   *   Use UNLOAD to release table entries as appropriate, since the
       255-entry/process limit of the Loader Segment Table (LST) is
       likely to be exceeded.  A preferred approach is to combine
       user-defined procedures whenever possible.

   *   Avoid mixing character modes and block modes during a single
       application.  This mixture requires considerable overhead in VPLUS
       whenever the switch from block mode to character mode occurs.

   *   Minimize the processing overhead required for opening and closing
       forms files by using only one forms file in any program or
       subprogram.  Only one VPLUS forms file can be opened at a time.

   *   Avoid switching between segments to minimize the input/output
       overhead incurred in loading segment information into the data
       stack.

       Segments should conform as much as possible to the functional
       characteristics of the application.  Commonly used routines should
       be grouped in the root segment (segment 0), since this segment is
       always memory-resident.  However, this segment should be as small
       as possible.

   *   Minimize the number of calculations performed.  If you need
       extensive numeric calculations, consider using subroutines in
       other languages and invoking them with the PROC statement.

   *   Use the MOVE verb whenever possible to transfer values between
       data items.  The MOVE statement does no data type checks or
       conversions.  The LET verb, however, performs time-consuming data
       type compatibility checks.

   *   Place frequently referenced data items on the top of the list
       register to minimize searches.  For example, place them towards
       the end of the LIST verb statement.  The list register is
       implemented as a linked list with list searches starting from the
       top of the list.

   *   Avoid using fragmented lists when accessing databases.  Transact
       has to unscramble the list before database input/output operations
       are performed.

   *   Minimize internal sorting of large files.

   *   Follow these guidelines when using the LET verb:

          *   It is most efficient to use single word integer types (I or
              J) for single +, -, =, or negation operations.

          *   Use long reals (E or R) for single operations that include
              *, /, //, LN, LOG, SQRT, or exponentiation, as well as +,
              -, =, or negation operations.

          *   Use packed decimal types (P) for all other operations.

          *   Avoid mixing types within an operation.

   *   List the data sets in ascending data set order when using the LOCK
       option on the LOGTRAN verb.



MPE/iX 5.0 Documentation