When running in thin client mode, you should be aware of the following performance considerations.
The information required to display a form (determined at JADE paint time) is collected and then stored in the database when possible the first time a form is created. (This is not done for read-only schemas.)
Subsequent creates of the form then send a request to build that form using the cached build data on the presentation client, unless that form or one of its subclasses has changed.
You should therefore ensure that all of the forms in deployed systems (including JADE) have had their forms built or generated by accessing all forms for the application. Failure to do so can cause a rebuild and a retransmission of that data to the presentation client on each form
Presentation clients should always be run in the font mode of the application server, which is usually a small font. If the font mode of the presentation client differs from that of the application server, font sizing operations executed from logic must be passed to the presentation client for correct execution (that is, the
To achieve maximum performance in the JADE thin client mode of operation, the number and size of transmissions to and from the presentation client need to be reduced.
All events that have defined JADE methods are transmitted to the application server for processing, with the exception of
The
Key events can also be significant. For example, if a form has
If performance is an issue, perform one of the following actions.
Remove or disable the form key events.
Use the
Use the
The
If the user moves the mouse slowly enough, the same results are achieved as those when running your application in standard (fat) client mode.
The first
In JADE thin client mode, no
The Painter running in JADE thin client mode uses a fixed
In addition, use the
All form definitions (presentation cache files) used in the thin client mode are saved in the <jade-temporary-directory>\Jade<modified-application-server-name><application-server-port>.jfm file in the directory specified by the value of the
The modified-application-server value consists of any characters that are alpha, numeric, space, underscore, dash, or dot (which are converted to underscores).
By default, the work file directory is created at the same level as the JADE binary directory (bin) and is named temp. For example, the directory is named c:\jade\temp if the JADE installation directory is c:\jade\bin. The
The cache file format enables the same JADE binaries to connect to different application servers and retain use of a presentation client cache file that is specific to the application server and port. Because it is not known whether the previously used cache file is used or required by the initiation of other applications, it is not deleted.
When a form is displayed in thin client mode, that form does not need to be transmitted to the presentation client again unless it or one of its superclasses has been changed or the form build data cannot be stored.
When an application is initiated, it transmits the forms it already has cached (and their build versions) to the application server. When form
This stored data is used across sessions. The first access of a form can take a significant time over a slow link when the form definition is transmitted initially.
To overcome this initial delay, you can generate the form in a local thin client environment and then include the generated file in the distributed client installation files.
Set the
For details about discarding picture and form entries in the presentation client cache file, see "
JADE skins use a facility similar to form build data. When the
In addition, a presentation client caches the skin information. As a result, subsequent calls of the
Changing a skin definition using the JadeSkinMaintenance form or by loading a form and data definition (.ddb
All picture properties set by logic are cached on both the application server and in the form file on the presentation client. When a picture has been transmitted to the client, subsequent use of that picture can be achieved by use of an identifier to that picture, eliminating the need to transmit the picture data.
When the contents of a text box change, only changed text is transmitted to the application server.
If the connection speed is low, disable the Debugger bubble help when stepping through code in thin client mode, by clicking the Bubble Inspector check box in the Debugger Options dialog.
All JADE logic GUI set property calls are buffered. The application server validates the property change and queues the change request for future processing. The changes are processed when a subsequent request requires interaction with the presentation client or the current processing is complete.
This buffering process should be transparent to the user and any logic, as the property values always return the values as if they had been applied immediately. (For details about forcing visual changes to be applied at some logical point before the current processing is complete, see "Flushing Commands Queued in the Application Server", earlier in this appendix.)
Most GUI property value read requests have the required data available within the application server environment, eliminating the need to access the presentation client for that information.
Even if you are not operating in thin client mode, it is much more efficient to copy a GUI value into a local variable for reuse rather than request the value again. For example, listBox.
Storing the value in a local property for reuse avoids a significant overhead for the second and subsequent requests for that value when it will not change. The first of the following examples is much more expensive than the second of these examples.
while count <= listBox.listCount do // inefficient use of the variable vars // recommended use of the variable drag : Integer; begin drag := keysList.dragListIndex; if drag <> -1 then keysList.addItemAt(keysList.text, drag); endif; keysList.listIndex := drag; end;
The following actions, get property requests, and method calls require communication with the presentation client and must wait for a response from the client.
Any form creation
Any external function call executed on the client that returns a value or has usage io or output parameters
app.
app.
app.
Any application start (that is, the
Window class
Window::
Window class
Window::
Form::
ComboBox::
ComboBox::
ComboBox::
Any
Any
Any
Picture::
Picture::
TextBox::
TextBox::
TextBox::
TextBox::
When the presentation client requests a print preview, the pages of the printed report do not have to be transferred to and from the application server. (This optimizes the performance of the print preview process when running JADE thin client mode over a slow network.)
However, if your application calls
See also "Enhancing the Performance of Windows and Forms", earlier in this appendix.