Performance tips for Web applications | 
   |
| Release 9.3.1 | 
         
             
         
         
             
         
         
             
         
       | 
   
Performance of a Web application involves both the speed at which the application responds to users and the number of users that an application can accommodate. When you think about improving the performance of your ArcGIS Server Web applications, the first thing that may come to mind is adding or upgrading hardware. However, there may be other things you can adjust in your application, your map, or your server settings that will improve the performance of your Web applications.
Designing maps for the Web is much different than designing paper maps, or even maps that you commonly work with in desktop applications such as ArcMap. If you have a map document that you commonly use in ArcMap, you may want to save a copy instead of publishing the map directly to ArcGIS Server. Using the copy, you can make some optimizations specifically for Web viewing.
What's so different about maps that you'll view on the Web? To get the best performance of your map over the Web, it's recommended that you use the Map Service Publishing Toolbar in ArcMap to examine your map document. Resolve all the Errors and as many of the Warnings as you can, then publish the map using the toolbar. This bases your service on a map service definition (.msd) file which is the way to publish your service for the fastest drawing available.
Regardless of whether your map service is MSD-based, you should still consider caching it for performance. Caching a map means that you create and store a set of prerendered map images that can very quickly be used by the application instead of waiting for the map to draw each time. If caching the map, you'll need to design the map to look good at all the scales at which it will be cached. See Planning a map cache for ideas on how to do this.
By caching your map services, you will reduce the time that it takes for your map to draw. Whenever possible, try to cache all of the services in your application and avoid combining cached and non-cached services. However, at 9.3, the display speed of maps in which non-cached and cached services are overlayed has been greatly improved.
The image format that you choose affects the performance, appearance, and size on disk of your cache. PNG 8 works well for many MXD-based overlay services, while PNG 32 is a better choice for MSD-based overlay services. For base maps, JPEG is often the best choice, especially if the map has a lot of color variation. See Choosing cache properties to learn more about each image format.
Internet Explorer 6 has limitations in its ability to display transparency for PNG 24 images. Avoid this scenario by:
Connect to your server using ArcGIS Server Internet connections to make more efficient use of server context requests. ArcGIS Server Local connections should be used only when the application requires changing the state of the service, which includes editing data.
The default Web Mapping Application that you see in Manager or your IDE includes Web controls such as the Table of Contents (TOC), OverviewMap and Scalebar. As you interact with your application, these controls request new images and updated status information. Eliminating controls from the application that are rarely used will help improve the application performance and scalability of the system.
For optimum performance, it's recommended that you deploy the Web applications and the REST and Web Services Handlers to a production quality Web server. The Web servers used internally by ArcGIS Server are not intended to be used in a production environment. Please refer to the System Requirements for a full list of supported servers. Among the popular ones are IBM WebSphere, BEA Weblogic, and so on.
It's also recommended that you configure an appropriate heap size for your web server's JVM using the -Xms and -Xmx JVM flags. This will greatly enhance the scalibility of your Web applications. For example, starting with an initial heap size of 256MB and going up to a maximum of 1GB by using the JVM options "-Xms256m -Xmx1024m" is usually sufficient. Please check your Web server's documentation for details on how to configure the heap size.
ArcGIS Server map services limit the number of records that can be returned by a query to 500 by default. Keep this value or lower it for optimal performance with queries. You can change the number of allowable result records by editing the MaxRecordCount property in the map service configuration file.
Use caution if you raise the default value. Queries that return more than 2000 records require the software to create scratch workspaces in your system TEMP directory to manage the result records. This can cause performance to degrade.
Using local paths to source maps and data tends to give better performance than using network or Universal Naming Convention (UNC) paths. If you use local paths and have more than one server object container (SOC) machine in your deployment, you'll need to duplicate the data on each machine using identical paths.
Another effective way to reference the data is through a central ArcSDE geodatabase. For example, you might store a (relatively lightweight) map document (.mxd) file on each SOC machine. In that map document, you could refer to source data stored in a common ArcSDE geodatabase. This way you wouldn't have to duplicate a large amount of data.