Java-To-COBOL Interaction Overhead

DO: For optimal performance, avoid Java-to-COBOL and COBOL-to-Java calls. Jumping between Java-to-COBOL interactions incur additional overhead that could lead to performance penalties. The framework must execute additional flushes and object re-reads (since Java has to sync itself with COBOL's objects). These reads will only need to be made if the session is "dirty," meaning modifications have been done by COBOL.

The framework will issue a log entry whenever the flush called is made such as in the following entry. In some cases when we find that a session is not dirty, the log entry may be written, but no flush acutally occurs. For example, the following log entries were issued in less than 1 millisecond duration and indicates that no flush occurred.

         16:33:01,742 [CobolThread 2] INFO  (com.splwg.base.support.context.FrameworkSession) Issuing flush
         16:33:01,742 [CobolThread 2] INFO  (com.splwg.base.support.context.FrameworkSession) Issuing flush
      

The following are general recommendations related to COBOL: