Try OpenEdge Now
skip to main content
Object-oriented Programming
Developing and Deploying Classes : Compiling class definition files : Using the COMPILER system handle : MULTI-COMPILE attribute
 
MULTI-COMPILE attribute
The MULTI-COMPILE attribute on the COMPILER system handle is a read-write attribute that improves the performance of the compiler in certain situations. Normally, the compiler compiles all class definition files in a class hierarchy. The compiler does not try to determine if the files in the class hierarchy have changed since the last compilation.
To improve performance, you can set the MULTI-COMPILE attribute to TRUE. This causes the compiler to only compile those class definition files within a class hierarchy that it has not already compiled since MULTI-COMPILE was set to TRUE. Your build application can set this attribute to TRUE when you are building all class definition files within an application, and no files are going to be modified during the process. While this attribute is TRUE, the ABL session caches class and interface compilations such that when a class or interface is thereafter compiled, ABL will not recompile any classes or interfaces that are in the cache. ABL flushes this cache when MULTI-COMPILE is set to FALSE.
The following example demonstrates the use of the MULTI-COMPILE attribute:
COMPILER:MULTI-COMPILE = TRUE.
COMPILE "C:\acme\myObjs\CustObj.cls".
COMPILE "C:\acme\myObjs\NECustObj.cls".
COMPILER:MULTI-COMPILE = FALSE.
In this example, any class definition files that have been compiled during the compilation of acme.myObjs.CustObj.cls and also participate in the class hierarchy of acme.myObjs.NECustObj.cls, are not compiled again during the compilation of acme.myObjs.NECustObj.cls.
Caution: Leaving this attribute set to TRUE causes the ABL session to ignore any changes to classes that have already been compiled during the session while the attribute was set.