Wednesday, February 13, 2008

Improve your AJAX Performance

Just quick note what I just got this morning from RDN with Damian.

  1. Disable compilation debug mode into false compilation debug="false"
    - This will decrease the javascript code downloaded from ajax frameworks

  2. If you don't use update panel, just using control toolkit,
    disable partial rendering on Script Manager
    EnablePartialRendering="false"
    - This improve the process for common postback, without checking update panel

  3. Try to saperate update panel as small as possible and put UpdateMode="Conditional".
    this will not send back other update panel content on partial rendering.
    By Default it sets to Always means it will send the content even not rendered.

  4. For using Not friendly AJAX control such as Telerik, Reporting Services Viewer which can not use update panel to do partial postback.
    You may put it into partial postback but add an attribute in Update Panel ChildrenAsTriggers="false". This will perform partial postback but not update your panel.

    so to update another panel you can do manually __doPostback(%= ID%, ...) or just handle it in the control.

    The ChildrenAsTriggers property determines whether postbacks from a child ontrol in an UpdatePanel result in its contents being refreshed. By default, this property is set to True and can be set to False only when the UpdateMode is set to conditional. Attempting to do so without this condition results in an InvalidOperationException being thrown by the ScriptManager during the page’s PreRender event.

  5. In my experience I also turn off EnableViewState and It works fine, but I don't know if this improve the performance

And Don't forget to use Web Development Helper for IE , but before that you may need to install IE Developer tool
http://msmvps.com/blogs/paulomorgado/archive/2007/02/18/developer-tools-for-internet-explorer.aspx

No comments: