Intersoft WebGrid Documentation
How-to: Improve performance using designer
See Also Send comments on this topic.
Intersoft WebGrid > Miscellaneous WebGrid Settings > How-to: Improve performance using designer

Glossary Item Box

This topic will discuss how to improve performance by managed WebGrid's caching, Client performance, Server performance and AJAX performance using WebGrid.NET Designer.

Caching

WebGrid.NET control includes automatic data caching feature to help reducing database workload. When enabled, a copy of datasource per user session will be stored in cache. As long as the cache is still valid and active, WebGrid will use the cached data for all data-aware functions, including during AJAX callback and full page postback.

Please note that this feature does not take into affect when the WebGrid is bound to DataSourceControl because DatasourceControl already has its own Caching mechanism and is more sophisticated. This feature is designed to traditional datasouce binding (eg. via InitializeDataSource event)

  1. Page Cache.
    This is a good option to cache relatively small datasource.
    The cache is oftenly cleared when the system needs more memory resource.
  2. Session
    Store data cache to ASP.NET Session.
    This is a good option to store user-specified datasource. Session is also recommended when you need data to remain cached as long as the user's session is active .
  3. File Server
    Store data cache to physical disk, usually file server.
    This is a preferrence when you need to cache relatively large data source in a long time span.
    Please note that this option may be slower than in-memory storage.

    If you have set Data Cache to File Server, you must specify FileServer Connection. Example "C:\CacheStorage". Note that you need to set read and write permission for the worker process to access the specified path

Performance Tuning

Performance tuning in WebGrid can be grouped into 3 categories.

  1. Client performance.
    The tuning significantly reduces page output size which results in faster page response
    • Enable default style feature.
      When default style is enabled, WebGrid does not generate individual control style in the rendered page. This results in significantly reduced page size, especially when there are lot of WebGrid instances in the page
    • Use WebStyleManager to apply theme globally into entire application.
      WebStyleManager is a great way for applying global theme to entire application. WebStyleManager allows you to use custom styles with high page performance by generating the styles into external stylesheet.
      To learn more about WebStyleManager, please refer to WebDesktop.NET documentation, and read the concepts under WebStyleManager's topic.
  2. Server performance.
    You can gain better page throughput and performance by using appropriate Cache configuration and ViewState setting.
    • Reduce database workload by caching frequently used data.
      Appropriate utilization of built-in data cache feature in WebGrid.NET can help in delivering better response and page performance in overall.
    • Determine best ViewStateStorage configuration-set for this control.
      • ViewState Storage
        1. None
        2. PageCache
        3. Session
        4. FileServer
        With this setting, you can choose where to store the view state of this control. In common simple scenarios, you can set this to None which result in best performance. Set to FileServer if you want maximum availability and access to the state from multiple web servers
      • ViewState Item.
        1. Behavior
        2. BehaviorAndCollection
        3. BehaviorAndStyle
        4. All
        Select the kind of properties that should be saved in the view state. The behavior option should result in best performance.
      • ViewState FileServer Connection.
        If you choose FileServer option for ViewStateStorage, you need to set the FileServer Connection.
        Example : "C:\CacheStorage".
        Note that you need to set read and write permission for the worker process to access the specified path
  3. AJAX performance (Advanced).
    By properly configuring the following settings, you can significantly improve AJAX's callback performance. These settings are applicable only in DataBound mode usage.
  • Post control state.
    When set to true, the control state is submitted during AJAX call.
    If you set the control's properties in design-time to repopulate during postback, you can set this option to False.
  • Post hidden fields.
    When set to True, the hidden fields in this page are submitted along the AJAX call.
    If you do need to access hidden fields in WebGrid events, you can generally set this option to False
  • Post INPUT controls.
    When set to True, the INPUT controls such as textbox, radio button, check box and other html input controls are submitted along the AJAX call.
    If you do not access these controls (or you do not need to obtain the values of these controls), you can set this option to False
  • Post view state.
    When set to true, the viewstate of the page is submitted along the AJAX call.
    If you do not need to access or interact with other controls in the page during WebGrid's AJAX events, you can set this option to False

See Also

©2012 Intersoft Solutions Corp. All Rights Reserved.