skip to main content

Performance Tuning : Guidelines for performance optimization : User Interface Optimization

User Interface Optimization
The isCOBOL architecture separates the UI from the back end elaboration using a client/server logic. The UI is managed by the client part while the back end is managed by the server part. Every time the user interaction causes some COBOL code to be executed (e.g. the user leaves a field that has an After Procedure) and everytime the program must update the video or accept the user input, client/server traffic is generated.
When the client part and the server part are executed by two different JVM processes (e.g. in thin client) then the performance may be affected by the client/server communication and the below suggestions beneficial effects will be more evident.
The main objective is to reduce the number of embedded and event procedures handled by the program so that the user interface must not send too much information to the server part while the user is interacting with it. For example, if you toke advantage of Before and After procedures to color the current Entry-Field while the user navigates on the screen, then you may think to instruct the runtime by setting iscobol.gui.curr_bcolor and iscobol.gui.curr_fcolor properties in the configuration instead of coding embedded procedures.
UI changes bufferization
isCOBOL includes an internal optimizer that gathers data of all DISPLAY and MODIFY (if the GIVING clause is omitted) statements and sends this data to the client
where either WFLUSH-REFRESH or WFLUSH-ALLOW W$FLUSH op-codes are called
when an INQUIRE is performed, unless WFLUSH-INHIBIT W$FLUSH op-code was called. Note that not all INQUIREs cause network traffic, it depends if the Framework needs to communicate with the UI in order to retrieve the inquired attribute.
Event Lists
isCOBOL also offers the ability to discard some events so that when they happen the client doesn’t communicate with the server. This feature is obtained by setting the EVENT-LIST and EXCLUDE-EVENT-LIST properties. See Controls Reference for details.
The drag events of Grid control can be disabled also through the configuration property iscobol.gui.grid.no_cell_drag (boolean) * or the style No-Cell-Drag.
Programming Tips
Some tips to write programs optimized for the client/server environment:
setting iscobol.gui.curr_bcolor and iscobol.gui.curr_fcolor in the configuration is preferable than changing the EntryField colors in its embedded procedures.
setting Row-Cursor-Color (or Row-Cursor-Background-Color and Row-Cursor-Foreground-Color) in the Screen Section is preferable than changing the Region-Color (or Region-Background-Color and Region-Foreground-Color) property inside Grid event procedures.
rely on the Search-Options and Search-Text properties instead of scanning the Grid content with a loop of INQUIRE of the CELL-DATA property when you’re looking for a text in the Grid.

Copyright (c) 2017 Veryant
Contact us
Please share your comments on this manual or on any
Veryant product documentation with the email button at the top left