Performance tips for Web applications

Release 9.3 E-mail This Topic Printable Version Give Us Feedback

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.

Design your map for performance

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 improve the performance of your map over the Web, it's recommended that you cache the map, and if that's not possible, it's recommended that you simplify the map. Both of these require that you make design changes to your map document.

Cache your map services

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.

Evaluate the image format that your map cache is built with

At 9.2 the default image format for the caching tools was PNG24. Using a different image format, such as PNG8 or JPEG, can result in smaller image file sizes and will result in a faster display of images in the Map control. Note that at version 9.3, the default cache format is now PNG8.

Avoid using Internet Explorer 6 when the Web application contains multiple cached services in PNG24 format

Internet Explorer 6 has limitations in its ability to display transparency for PNG24 images. The Web ADF includes code that works around this limitation, but there is a performance penalty incurred when this scenario is encountered. Avoid this scenario by:

Use ArcGIS Server Internet connections when possible

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.

Ensure the Overview Map control uses static mode

If your overview map appears to be slowing performance by constantly changing its scale and extent, open your Web application in Visual Studio and set the OverviewMap control's StaticMode property to True. This is the default for ArcGIS Server 9.3 Web applications. By setting StaticMode to True, the image in the OverviewMap will not change when the Map extent changes.

Configure the TOC control to optimize performance

The TOC control has several options that allow you to reduce the amount of information requested from the server.

Consider setting the Visible property on some of your MapResourceItems to False. This will result in the application opening faster and will the Web page user will need to turn on the layers manually.

Remove unnecessary Web controls

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.

Configure your web services to avoid per-request impersonation

When preparing your deployment environment, you need to make changes to avoid overworking the Local Security Authority Subsystem Service (lsass.exe).

When someone makes a request from one of your web services, the web server must authenticate itself with the Server Object Manager (SOM). The web server accomplishes this by impersonating the ArcGIS Web Services account, which was added to the AGSADMIN group when you ran the post install. This impersonation doesn't cost much under light loads, but under heavy loads the lsass.exe process can become overworked, causing a noticeable lag in performance. Heavy loads are considered 25 or more requests per second.

You can avoid this per-request impersonation by configuring your web services to run in an application pool that runs under the identity of the ArcGIS Web Services account. This lightens the load on the lsass.exe process and ultimately allows your services to run faster.

These ESRI Knowledge Base articles give additional background on the problem and describe how to make the adjustments to your configuration.

Use good coding practices

If you are customizing the Web mapping application in Microsoft Visual Studio or creating your own application from scratch, use the coding best practices in Guidelines for creating your own Web applications in the Developer Help.

Avoid unnecessarily large queries

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.