Siebel Performance Tuning Guide > Tuning Siebel Web Client for Performance > Best Practices for Siebel Web Client Tuning >
Improving Performance Using View Layout Caching
View layout caching in the browser (also referred to as layout caching or view caching) improves the performance of accessing views in a high interactivity application. It speeds up the rendering of views in a Siebel application session by caching the following on the browser:
- Static HTML (from the templates) used for interpreting the view.
- Dynamic HTML generated on the client for rendering controls.
Appropriate caching settings can optimize client performance and network utilization for Siebel client sessions. Caching behavior is subject to considerations described under Managing the Browser Cache.
Two kinds of view layout caching are used for the Siebel Web Client. These types of caching work together and should be configured as a system.
NOTE: Whether views can be cached depends on the underlying requirements described in Determining If Views Are Available for Layout Caching.
View Layout Caching in Memory
View layout caching in memory creates multiple HTML frames on a browser to store the layout for a view. The number of these frames represents the view cache size. When a view is displayed, the HTML frame containing the layout for that view will be sized to occupy all (100%) of the available browser space, while the other frames will be hidden (that is, sized to occupy 0% of the space).
For information on setting the view cache size, see Setting the View Cache Size.
View layout caching uses the following logic:
- If a user navigates to a view whose layout is already available in the browser memory cache, the HTML frame containing that view will be made visible and the currently visible frame will be hidden.
- If a user navigates to a view whose layout is not in the browser memory cache, one of the available HTML frames will be used to load the layout of the view into memory. The view layout will be loaded from the persistent cache, if possible. The view layout in memory will be cached subject to the View Cache Size setting.
- If the view layout is not currently stored in the persistent cache, then it is loaded from the server. It will also be stored in the persistent cache. The view layout in memory will be cached subject to the View Cache Size setting.
For more information, see Persistent View Layout Caching.
NOTE: The high interactivity framework separates the retrieval of the Siebel application user interface from the server and the retrieval of database records. Database records to be displayed in views are always retrieved from the server.
The memory cache contains the layouts of views that the user has visited and that are available for view caching. When the view cache is full and another view is visited, the first view visited is removed from the cache. The memory cache contents are thus managed on an LRU or least recently used basis.
The HTML frames are loaded into memory when a user navigates to the view. To cache a startup view (one that is cacheable), the user must visit the view twice—that is, visit it a second time after visiting another view.
NOTE: Views specifically created as home page views, such as Home Page View (WCC) for Siebel Call Center, are standard interactivity views and are not cacheable.
The view caching framework is designed so that if the frames containing cached views are deleted (for example, by performing a browser refresh, which removes any previously cached views), the framework begins reloading the layout cache, starting with the next cacheable view the user visits.
At startup, view layouts for recently visited views may be preloaded into the memory cache from the persistent browser cache on disk. This behavior is specified using the parameter ViewPreloadSize. For more information, see Persistent View Layout Caching and Preloading Cached Views into Memory.
Setting the View Cache Size
For browser memory caching, the size of the view layout cache is controlled by the View Cache Size user preference setting for each user, as described below.
NOTE: Setting View Cache Size to 1 turns off view caching. This has the same effect as setting the EnableViewCache parameter to FALSE, as described in Disabling View Layout Caching.
To set the size of the view layout cache
- From the application-level menu, choose View > User Preferences.
- From the Show drop-down list, choose Behavior.
- In the View Cache Size field, select a value from the drop-down list, or type in a value.
The default value for View Cache Size is 10. This value specifies that 10 HTML frames are cached in memory to represent Siebel view layouts. One of these frames is displayed at any one time.
- Using a figure that is too low may not provide enough caching if your users access many views and client machines have sufficient memory.
- Using a figure that is too high may impair performance by using more memory than is available on the machine.
Persistent View Layout Caching
Persistent layout caching stores the layout of certain views in a local client's browser cache on disk. The stored layout is then reused for subsequent visits to this view, in the same session or in a subsequent session. (For subsequent visits in the same session, the view layout is accessed from the browser memory cache, if available.)
Persistent view layout caching helps improve performance by reducing the number of pages that have to be generated from the server from session to session.
The parameter WebTemplateVersion determines whether the Siebel Web Engine will use a view layout stored in the browser's cache or build a new view layout. This parameter is located in the [InfraUIFramework] section of the application configuration file, such as uagent.cfg for Siebel Call Center. This file is located on the Siebel Server machine (running AOM).
When you modify Web templates for Siebel views, add the WebTemplateVersion parameter to the configuration file (if not already present), and set its value to 1. For example:
WebTemplateVersion = 1
Subsequently, each time you change any of the Web templates, increment the value of the parameter by 1. Doing so forces loading view layouts from the Web templates on the server.
When a view is requested, the Siebel Web Engine includes in the URL a checksum value that encapsulates the value of the WebTemplateVersion parameter.
- If the parameter value and the value encapsulated in the URL match, then it is assumed that the view layout for this view has not been updated. If it is available, the view layout stored in the persistent cache can be used.
- If no match is found, then a new view layout is loaded from the server. The Web template on the server is presumably more current than the view layout stored in the browser's persistent cache.
Preloading Cached Views into Memory
For recently visited views, view layouts that are cached in the persistent cache on the browser may be preloaded into browser memory when the user logs in. The number of views that can be preloaded depends on the content of the persistent cache and is limited by the setting of the View Cache Size setting for each user.
For better performance at login time, it may be helpful to further limit the number of view layouts that are preloaded into memory during startup. To do this, use the parameter ViewPreloadSize.
NOTE: ViewPreloadSize only affects a user session when it is set to a positive integer value lower than the View Cache Size value. If the parameter is not set, the default behavior is to preload the number of view layouts corresponding to the View Cache Size value, minus one. (One of the frames specified using View Cache Size is reserved for the application startup view, where applicable.)
ViewPreloadSize should be added to the [InfraUIFramework] section of the application configuration file, such as uagent.cfg for Siebel Call Center. This file is located on the Siebel Server machine (running AOM). For example:
ViewPreloadSize = 5
If ViewPreloadSize is set to 0, then no view layouts are preloaded into memory. In scenarios where users frequently log into the Siebel application, such as to access a single view, then log out again, login performance may be more important than precaching multiple views. In this case, you may choose to set this parameter to 0.
Disabling View Layout Caching
You can disable browser memory caching of view layouts for your application users by changing the parameter EnableViewCache to FALSE in the [InfraUIFramework] section of the application configuration file, such as uagent.cfg for Siebel Call Center. For example:
EnableViewCache = FALSE
NOTE: In general, setting EnableViewCache to TRUE is recommended. If some users do not need view layout caching, they can set View Cache Size to 1, as described in Setting the View Cache Size.
Setting EnableViewCache to FALSE disables browser memory view layout caching only. It does not disable persistent view layout caching.
Determining How the Current View Layout Was Loaded
If you are running an application and want to determine how the current view was retrieved, go to the view, press SHIFT, and choose Help > About View. The Cache Mode identified for the current view indicates how the application retrieved the view layout. Possible values include:
Determining If Views Are Available for Layout Caching
Not all Siebel views are available for layout caching. Views that contain applets that have dynamic layouts or controls that are data-dependent cannot be cached. Only applets that support high interactivity are available for view layout caching.
Layout caching is a feature of the C++ class that implements an applet. The ability to be cached is determined by a property of each applet's class object definition. Using Siebel Tools, check the value of the High Interactivity Enabled property of a class object definition to determine whether applets for this class support layout caching. For a view to be available for caching, the class objects for all of the applets in the view must have High Interactivity Enabled values of 2 or 4 (available for caching).
For detailed information about settings for the High Interactivity Enabled property for a class, see Siebel Object Types Reference.
View layout caching is also disabled for a view in the following cases:
- If personalization rules are defined for any of the applets
- If any of the applets are dynamic toggle applets
- If any of the applets are hierarchical list applets or explorer (tree) applets
- If HTML frames are used within the view template (for example, for explorer views)