|
ION Java User's Guide: Overview of ION Java |
|
There are several issues which impact ION Java performance. While steps can be taken to improve performance (see Tips for Increasing Execution Speed in ION Java), many users note that execution of ION Java applications are slower than equivalent applications executed in IDL. Also, IDL commands called from an applet execute more slowly than IDL command line execution. Performance can also differ between client platforms.
Extra communication layers are necessary when executing an IDL command in ION Java and then displaying the results. When an IDL command is called from an ION Java applet or Java application, the following required steps impact execution time:
| Note Using the same machine as both the client and the server can further degrade ION Java performance. Although network traffic is not an issue, communication must still be routed through sockets and HTTP. Depending on the server machine specifications, the extra resources required for context switching between the server and the browser may hinder performance. |
The following items can increase the execution speed of ION Java applets and applications:
It is always more efficient to package multiple IDL commands into a single .pro file than to call individual commands. With individual commands, the communication layer must be transversed for each command. With a a single package of commands, the communication layer is transversed only once. An example is included in the "Advanced" section of the ION Examples. See Running the ION Java Examples.
TrueColor (24-bit) images are three times as large as indexed (8-bit) images. While ION Java is capable of displaying 24-bit TrueColor images, you can speed up ION Java execution by converting 24-bit images to 8-bit images. To do so, use the IDL COLOR_QUAN function before displaying the image. By decreasing the image size, this significantly reduces the transfer time necessary to display a graphics primitive sent from the server to the client. Related considerations include clients who may not have displays configured to display 24-bit images and browsers which automatically dither images. An example is included in the "Basic" section of the ION examples. See Running the ION Java Examples.
ION Java sends graphics primitives to the client to be drawn by Java. More complicated plots transfer more graphics primitives and take a longer time to be drawn. You can decrease the amount of information sent to the client and time required to draw complicated plots by doing one of the following:
These methods send a single image to the client to be drawn. For very complicated plots, this can be more efficient. For simple plots, however, this could increase the amount of data that is sent to the client so using the default graphics primitives may be more efficient. An example is included in "Advanced" section of the ION Examples. See Running the ION Java Examples.
Because ION Java applications can be image-intensive, their performance depends strongly on network bandwidth. Bandwidth may not be an issue if you are serving your ION Java applications only to the users of your high-speed company intranet, but if your users are likely to be accessing your application over the Internet, through an analog telephone line and low-speed modem, then close consideration must be given to the size of data transferred to and from the ION Server. For example, if your application allows the user to zoom in on a region of interest, then you could provide the smallest, lowest-quality image necessary to give the user the required information at each stage in the drill-down process.
Both TrueType and hardware fonts can cause increased download times to client machines. When a TrueType font is rendered in IDL, it is sent to the device as a set of polygons. Depending on the symbol being rendered, the number of polygons generated can be quite large, which can increase download times. If you use hardware fonts, the amount of data being sent to the client can be decreased in certain situations since only the attributes and parameters of the fonts are being sent. Another workaround is to render the graphic before sending it to the client. See Send Complex Plots as a Single Image for more information.
IDL Online Help (March 06, 2007)