Optimizing Application

When a user launches a Nexaweb application, Nexaweb loads the client files onto the user system from the server. How you chose to develop your application determines how much of the application resources reside on the client solely and how much on the server.

Application performance is largely affected by the size and number of application files traveling between the server and client.

To optimize application performance, you need to determine a balance between:

  • Client startup time performance
  • Overall application performance

To maximize the performance in either of these areas, you need to determine when to send application files from the server to the client.

To improve overall application performance you can pre-load many Nexaweb application files during application launch. Although pre-loading files slows the application launch, it speeds up the performance of the application later by reducing the amount of network traffic. Still, improving application performance does not mean that you have to sacrifice startup performance as there are methods for improving startup performance even if you pre-load more application files.

Generally, to improve:

  • Client startup performance - package resources in JAR files and use pack200 when applicable.
  • Application overall peformance - pre-load application files.

The following table lists the specific resources that should be considered when trying to optimize performance.

File TypesAction
MCOsCompress into Jar files and place on the
client classpath.

Nexaweb Plugins

Compress plug-in JARs using pack200 and
place in /plugins/pre-loaded directory


Custom plugins

Compress custom plug-in JARs using pack200 and
place in /plugins/pre-loaded directory


Widget Images

These are the images that pertain to Nexaweb UI
components (for example, <checkBox>).

Compress in a Jar file and place on the classpath.

Change references in XAL files to classpath references
instead of URLs.


Custom Images

Compress in a Jar file and place on the classpath.

Change references in XAL files to classpath references
instead of URLs.

Overriding the JVM init sequence 


Optimizing Client Startup

To optimize client loading, consider which classes to pre-load during initialization and which to load dynamically, when needed.

To optimize class loading, generally, pre-load classes required for your application's welcome page and for the first actions you expect the application users to perform from there. Load other classes dynamically, as needed. The number of classes you load at initialization may slow application start, but increase application performance afterwards.

The Nexaweb startup occurs as follows:

  1. The default index.jsp file loads, dynamically creating an applet tag.
  2. The applet tag invokes the Java runtime, initializing Java.
  3. Java loads the Nexaweb bootstrap JAR, a small JAR file that ensures the correct environment is available to run Nexaweb, and reads the configuration information.
  4. The bootstrap JAR loads the Nexaweb Client.
  5. Once loaded and initialized, the Nexaweb Client loads the default XML file with user interface markup. 

See the following topic for details on how to optimize client start-up.

Optimizing Overall Application Performance

To improve application performance in addition to the files you pre-load for application start-up you can pre-load the following types of files:

  • Image
  • Nexaweb and custom plug-ins
  • Client-side code

See the following topic for details on how to optimize overall application performance.

Assessing Application Performance

This topic,provides instructions on how to assess the load-time performance of an existing application.

In addition:

 

Helpful Tip

To inspect what gets loaded to the client when an application runs, you can run the application

though a TCP/IP tunnel. This shows exactly how many requests are being made and which resources

the client requests.

Nexaweb