Oracle Forms Server Release 6i:
Deploying Forms Applications to the Web with Oracle Internet Application Server

A83591-01

PrevNext

Contents

Index

11
Performance Tuning Considerations

11.1 Introduction

This chapter describes the tuning considerations that arise when you use Forms Server to deploy an application over the Internet or other network environment. This chapter looks at the network and the resources on the application server. Tuning the connection between Forms Server and the database server is beyond the scope of this chapter.

11.2 Built-in Optimization Features of Forms Server

The Forms Server and Java client include several optimizations that fit broadly into the following categories:

11.2.1 Minimizing Client Resource Requirements

The Java client is primarily responsible for rendering the application display. It has no embedded application logic. Once loaded, a Java client can display multiple Forms simultaneously. Using a generic Java client for all Forms Server applications requires fewer resources on the client when compared to having a customized Java client for each application.

The Java client is structured around many Java classes. These are grouped into functional subcomponents, such as displaying the splash screen, communicating with the network, and changing the look-and-feel. Functional subcomponents allow the Forms Developer and the Java Virtual Machine (JVM) to load functionality as it is needed, rather than downloading all of the functionality classes at once.

11.2.2 Minimizing Forms Server Resource Requirements

When a Form definition is loaded from an FMX file, the profile of the executing process can be summarized as:

Of these, only the Data Segments section is unique to a given instance of an application. The Encoded Program Units and Boilerplate Objects/Images are common to all application users. Forms Server maps the shared components into physical memory, and then shares them between all processes accessing the same FMX file.

The first user to load a given FMX file will use the full memory requirement for that Form. However, subsequent users will have a greatly reduced memory requirement, which is dependent only on the extent of local data. This method of mapping shared components reduces the average memory required per user for a given application.

11.2.3 Minimizing Network Usage

Bandwidth is a valuable resource, and the general growth of Internet computing puts an ever increasing strain on the infrastructure. Therefore, it is critical that applications use the network's capacity sparingly.

Forms Server communicates with the Java client using meta data messages. Meta data messages are a collection of name-value pairs that tell the client which object to act upon and how. By sending only parameters to generic objects on the Java client, there is approximately 90-percent less traffic (when compared to sending new code to achieve the same effect).

Forms Server intelligently condenses the data stream in three ways:

11.2.4 Maximizing the Efficiency of Packets Sent Over the Network

Latency can be the most significant factor that influences the responsiveness of an application. One of the best ways to reduce the effects of latency is to minimize the number of network packets sent during a conversation between the Java client and the Forms Server.

The extensive use of triggers within the Forms Developer model is a strength, but they can increase the effect of latency by requiring a network round trip for each trigger. One way to avoid the latency concerns adhering to triggers is by grouping them together through Event Bundling. For example, when a user navigates from item A to item B (such as when tabbing from one entry field to another), a range of pre- and post-triggers may fire, each of which requires processing on the Forms Server.

Event Bundling gathers all of the events triggered while navigating between the two objects, and delivers them as a single packet to the Forms Server for processing. When navigation involves traversing many objects (such as when a mouse click is on a distant object), Event Bundling gathers all events from all of the objects that were traversed, and delivers the group to the Forms Server as a single network message.

11.2.5 Rendering Application Displays Efficiently on the Client

All boilerplate objects in a given Form are part of a Virtual Graphics System (VGS) tree. VGS is the graphical subcomponent that is common to all Forms Developer products. VGS tree objects are described using attributes such as coordinates, colors, line width, and font. When sending a VGS tree for an object to the Java client, the only attributes that are sent are those that differ from the defaults for the given object type.

Images are transmitted and stored as compressed JPEG images. This reduces both network overhead and client memory requirements.

Minimizing resources includes minimizing the memory overhead of the client and server processes. Optimal use of the network requires that bandwidth be kept to a minimum and that the number of packets used to communicate between the client and Forms Server be minimized in order to contain the latency effects of the network.

11.3 Tuning Forms Server Applications

An application developer can take steps to ensure that maximum benefits are gained from Forms Server's built-in architectural optimizations. The remainder of this chapter discusses key performance issues that affect many applications and how developers can improve performance by tuning applications to exploit Forms Server features.

Issues discussed are:

11.3.1 Location of the Form Server with Respect to the Data Server

The Java client connection to the Forms Server can use features such as Event Bundling to effectively counteract the effects of network latency. It uses message diff-ing to reduce network bandwidth. On the other hand, the client/server relationship that exists between the Forms Server and the data server is much less tolerant of round-trip delays and network congestion.

For these reasons, it is best to locate the Forms Server on the same high speed LAN as the data server, which may consequently locate the Forms Server more remotely from the users. This may seem contrary to the standard convention of placing servers in close proximity to users, but it is a consequence of Forms Server's improved efficiency over a network as compared to a traditional client/server implementation.

In an optimal configuration, as shown in Figure 11-1, the Form Server and data server are co-located in a Data Center, which is the recommended set-up, while clients access the server over low-bandwidth (modem) and high-latency (satellite) connections.

Figure 11-1 Co-Locating the Forms Server and Data Server

11.3.2 Minimizing the Application Startup Time

First impressions are important, and a key criterion for any user is the time it takes to load an application. Startup time is regarded as overhead. It also sets an expectation of future performance. When a business uses thin-client technologies, the required additional overhead of loading client code may have a negative impact on users. Therefore, it is important to minimize load time wherever possible.

After requesting a Forms application, several steps must be completed before the application is ready for use:

  1. Invoke Java Virtual Machine (JVM).

  2. Load all initial Java client classes, and authenticate security of classes.

  3. Display splash screen.

  4. Initialize Form:

    1. Load additional Java classes, as required.

    2. Authenticate security of classes.

    3. Render boilerplate objects and images.

    4. Render all elements on the initial screen.

  5. Remove splash screen.

  6. Form is ready for use.

An application developer has little influence on the time it takes to launch the JVM. However, the Java deployment model and the structure of the Form Developer Java client allow the developer to decide which Java classes to load and how. This, in turn, minimizes the load time required for Java classes.

The Java client requires a core set of classes for basic functionality (such as opening a window) and additional classes for specific display objects (such as LOV items). These classes must initially reside on the server, but the following techniques can be used to improve the time it takes to load these classes into the client's JVM:

11.3.2.1 Using JAR Files

Java provides the Java Archive (JAR) mechanism to create files that allow classes to be grouped together and then compressed (zipped) for efficient delivery across the network to the client. Once used on the client, the files are cached for future use.

Form Server provides the following pre-configured JAR files to support typical deployment scenarios:

File name  Usage  Description 

f60all.jar 

Optional 

Contains the entire set of Java class files for all runtime situations. 

f60common.jar 

Required 

Required by the applet. 

f60generic_laf.jar 

Optional 

Must be loaded if the application is deployed with the Generic lookAndFeel runtime setting or if no lookAndFeel setting is specified.

<APPLET ...>
<PARAM NAME="lookAndFeel" VALUE="Generic">
...
</APPLET>
 

f60oracle_laf.jar 

Optional 

Must only be loaded if the application is deployed with the Oracle lookAndFeel runtime setting.

<APPLET ...>
<PARAM NAME="lookAndFeel" VALUE="Oracle">
...
</APPLET>
 

f60splash.jar 

Required 

Required by the applet. 

f60tree.jar 

Optional 

Must only be loaded if the Forms application uses the hierarchical tree control. 

To specify one or more JAR files for an applet, specify the ARCHIVE parameter in the <APPLET> tag of the referencing HTML file. For example:

<APPLET CODEBASE="http://www.server.com/webcode/"
ARCHIVE="f60all.jar, icons.jar"
CODE="oracle.forms..">

11.3.2.2 Using Caching

Both of the supported JVMs for Form Server (Oracle JInitiator and Oracle JDK) support the caching of JAR files. When the JVM references a class, it first checks the local client cache to see if the class exists in a pre-cached JAR file. If the class exists in cache, JVM checks the server to see if there is a more current version of the JAR file. If there isn't, the class is loaded from the local cache rather than from across the network.

Be sure that the cache is of proper size to maximize its effectiveness. Too small a cache size may cause valid JAR files to be overwritten, thereby requiring that another JAR file be downloaded when the application is run again. The default cache size is 20MB. This size should be compared with the size of the cache contents after successfully running the application.

JAR files are cached relative to the host from which they were loaded. This has implications in a load-balancing architecture where identical JAR files from different servers can fill the cache. By having JAR files in a central location and by having them referenced for each server in the load-balancing configuration, the developer can ensure that only one copy of each JAR file is maintained in the client's cache. A consequence of this technique is that certain classes within the JAR file must be signed to enable connections back to servers other than the one from which they were loaded. The Oracle-supplied JAR files already pre-sign the classes.

11.3.2.3 Deferred Load on Demand

One downside of the JAR method is that all classes within a JAR file need to be loaded and validated by the JVM before execution continues. A useful feature of the JAR file is the ability to refer to other JAR files, thus limiting the number of classes stored within the given archive. The JVM is able to navigate to the required JAR files in the order required by the application.

The Oracle-supplied f60splash.jar file contains enough logic to initialize the client and display a welcoming splash screen. It also contains deferred references to files that are contained in the other JAR files, which are subsequently loaded on demand. In order to use deferred load on demand, the f60splash.jar file must be the first JAR file referenced in the HTML page.

11.3.3 Reducing the Required Network Bandwidth

The developer can design the application to maximize data stream compression by using message diff-ing, which sends along only the information that differs from one message to another. The following steps can be taken to reduce the differences between messages:

In addition, when triggers or other logic are used to alter item properties, then you should group properties of similar items together before altering the item properties of another display type. For example:
set_item_property(text_item1_id, FONT_WEIGHT, FONT_BOLD);
set_item_property(text_item2_id, FONT_WEIGHT, FONT_BOLD);
set_item_property(text_item3_id, FONT_WEIGHT, FONT_BOLD);
set_item_property(button_item1_id, LABEL, 'Exit');
...

Set_Application_Property (MENU_BUFFERING, 'false');

Menu buffering applies only to the menu properties of LABEL, ICON, VISIBLE, and CHECKED. An ENABLE/DISABLE event is always sent and does not entail the retransmission of an entire menu.

11.3.4 Other Techniques to Improve Performance

The following techniques may further reduce the resources required to execute an application:


Prev Next
Oracle
Copyright © 2000 Oracle Corporation.

All Rights Reserved.

Contents

Index