Progress
Client Deployment
Guide


R-code Execution Environment

Progress provides a dynamic environment for loading and executing r-code procedures from operating system files, standard procedure libraries, and memory-mapped procedure libraries. This execution environment consists of the following components:

For more information about the r-code execution environment, see the Progress Programming Handbook.

Progress loads and executes r-code procedures in different ways, depending on whether you store the r-code files in an r-code library and the type of library. The following sections provide an overview of how Progress loads and executes r-code from an operating system file, a standard procedure library, and a memory-mapped procedure library.

Loading and Executing R-code From a File

When loading an r-code procedure from an operating system file in a directory, Progress opens the r-code file, loads the required r-code segments into local memory, and closes the file.

When executing an r-code procedure from an operating system file, Progress accesses and executes the r-code segments in the execution buffer in local memory. Progress also swaps segments to and from the session sort file, as necessary.

Loading and Executing R-code From a Standard Library

When loading an r-code procedure from a standard library, Progress opens the library file and loads the required r-code segments into local memory. The library remains open until the end of your Progress session or until you remove the library from the PROPATH. When Progress needs to load an r-code segment for a procedure in that library, it accesses the open library in local memory. This is much faster than loading the same procedure from an operating system file.

When executing an r-code procedure from a standard r-code library, Progress accesses and executes the r-code segments in the execution buffer in local memory. Progress does not swap r-code segments to the session sort file unless you specify the PROLIB Swap (-pls) startup parameter. By default, Progress reloads segments from the open library in local memory.

Loading and Executing R-code From a Memory-Mapped Library

When loading an r-code procedure from a memory-mapped library, Progress opens the library and maps it in shared memory where multiple users can access it. The library remains mapped until the end of your Progress session or until you remove the library from the PROPATH. When Progress needs to execute an r-code segment for a memory-mapped procedure, it accesses the library in shared memory. This is even faster than loading the same procedure from a standard library.

Tuning R-code Execution

Table 4–1 lists the startup parameters you use to tune the r-code execution environment for a session.

Table 4–1: Startup Parameters for Tuning the Execution Environment
Startup Parameter
Suggested Use
Maximum Memory (-mmax)
Use this parameter to set the initial execution buffer ceiling. The default is 3096K. Progress increases the execution buffer dynamically as required, but only after attempting to swap segments to the sort file. To minimize swapping I/O, increase this parameter.
Directory Size (-D)
Use this parameter to set the initial number of r-code directory entries. Progress can reuse directory entries for inactive r-code files. However, reusing an entry requires some overhead. To reduce this overhead, increase the value of the -D parameter. The default is 100 entries, the minimum is 5 entries, and the maximum is 500 entries.
Stack size (-s)
When you load data definitions for very large tables or use recursive procedures, you might receive an error message directing you to increase this parameter. This parameter changes the size of the stack (an internal memory area used by Progress program modules).
Nested Blocks (-nb)
If memory is severely limited, use this parameter to limit the maximum number of nested procedure blocks allowed.

For more information about these startup parameters, see the Progress Startup Command and Parameter Reference.

Tuning Standard R-code Libraries

Table 4–2 lists the startup parameters you use to tune standard r-code libraries for a session.

Table 4–2: Startup Parameters for Tuning R-code Libraries 
Startup Parameter
Suggested Use
PROLIB Memory (-plm)
If you have a large standard library or a memory shortage, use this parameter to allocate a 512-byte cache for the library’s directory instead of loading the entire directory into memory. This parameter slows the speed of library access but increases available memory.
PROLIB Swap (-pls)
Use this parameter to allow swapping from a standard library to a sort file. Progress typically reads library-stored r-code from the library instead of swapping to a sort file. However, when storing the library over a network, swapping to a local sort file might be faster than accessing the remote library.

If you specify the PROLIB Memory (-plm) and PROLIB Swap (-pls) startup parameters with memory-mapped libraries, Progress ignores them.

For more information about these startup parameters, see the Progress Startup Command and Parameter Reference.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095