Printing
The first time isCOBOL inquires the system printers (e.g. the first time you call WIN$PRINTER to enumerate printers or select a printer) it takes more time because it loads printer settings in memory. From the second time, it reads from the memory and it’s faster. In order to hide the first slow printer interaction to the user, you might consider calling the WINPRINT-GET-NO-PRINTERS op-code in a separate thread at the very beginning or your application while the user is inputting login data or exploring the main menu looking for the subprogram to launch.
By default isCOBOL stores the print job in a temporary file. When the print file is closed, it reads from the temporary file and sends data to the spooler. Since reading/writing memory is faster than reading/writing disk files, you can tell isCOBOL to save temporary information in memory instead of using a temporary file. To achieve it, set the iscobol.print.memory (boolean) configuration entry to true.
In a thin client environment, print commands are bufferized to optimize the performance. The commands are sent to the client when the print file descriptor is closed, whenever a function that retrieves information (i.e. WINPRINT-GET-PRINTER-INFO or WINPRINT-GET-PAGE-LAYOUT) is called or when the limit set by the iscobol.gui.csmaxbuffersize * configuration property is reached. Bufferized print commands can be compressed or not depending on the iscobol.gui.cscompress * setting.