Table of Contents
- Getting Started
- EO.Pdf
- EO.Web
- Overview
- Installation & Deployement
- EO.Web ToolTip
- EO.Web Rating
- EO.Web Slider & RangeSlider
- EO.Web ListBox
- EO.Web ComboBox
- EO.Web Captcha
- EO.Web ASPX To PDF
- EO.Web Slide
- EO.Web Flyout
- EO.Web EditableLabel
- EO.Web ImageZoom
- EO.Web Floater
- EO.Web Downloader
- EO.Web ColorPicker
- EO.Web HTML Editor
- EO.Web File Explorer
- EO.Web SpellChecker
- EO.Web Grid
- EO.Web MaskedEdit
- EO.Web Splitter
- EO.Web Menu
- EO.Web Menu
- Product Feature List
- Performance Tips
- Quick Start Guide
- Using EO.Web Menu
- Understanding built-in styles
- EO.Web Slide Menu
- EO.Web TabStrip
- EO.Web TreeView
- EO.Web Calendar
- EO.Web Callback
- EO.Web MultiPage
- EO.Web Dialog
- EO.Web AJAXUploader
- EO.Web ProgressBar - Free!
- EO.Web ToolBar - Free!
- EO.WebBrowser
- EO.Wpf
- Common Topics
- Reference
Performance Tips |
Overview
This section covers a few performance tips that help EO.Web Controls to run faster.
1. Switch the page to standards-compliant mode
Internet Explorer 6 supports standards-compliant mode and backwards compatible mode (the so called quirks mode). EO.Web Controls are optimized to perform the best in standards-compliant mode. In quirks mode, EO.Web Controls have to execute varies of additional code to workaround those "quirks". These extra steps are skipped when EO.Web Controls detect the page is in standards-compliant mode.
Pages created by Visual Studio.Net 2003 are NOT in standards-compliant mode by default. To switch them into standards-compliant mode, you would need to modify the default !DOCTYPE string on the top of the page from
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
To
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
You can add the above !DOCTYPE string if the document does not have one.
Pages created by Visual Stdudio.Net 2005 have the following !DOCTYPE string:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
for RTM builds. These pages are already in standards-compliant mode.
To check whether a page is in standards-compliant mode, check document.compatMode property. If the value is "CSS1Compat", then the page is in standards-compliant mode.
2. Use physical script files
EO.Web Controls never render script file inline, even when a physical script location is not provided. When physical script location is not provided, EO.Web Controls still render script files as external script links. Those links are dynamic links that points to a non-existing Url on the server. EO.Web Controls are able to intercept such Url on the server and serve the script file as if they were real physical files.
While this is much better than rendering the whole script file inline within each .aspx page, it still involves additional cost. By providing EO.Web Controls a physical script path, you can completely eliminate this extra cost. The directory must already exists and be configured to be writable by the ASP.NET working process.
See here for detailed instruction on how to enable physical script files.
3. Use external CSS file
EO.Web Controls supports both inline CSS text and external CSS file. To use inline CSS text, you would set the CssText property of one of the style property. To use CssFile, you would set CssFile property and CssClass property of the style property.
While using CSS text is more convenient than using CSS file, the CSS text are rendered with the controls in the result page every time the page is requested. This costs extra bandwidth. Moving the CSS text into a separate CSS file so that the whole file can be cached by client side browser as one entry would improve the performance.
EO.Web Controls provide a To CSS Class button in all Control Builders (Menu Builder, Slide Menu Builder, etc) to convert all inline CSS text used by the control into CSS class. The result CSS class is stored the control's CssBlock property.
4. Remove unnecessary images
Images are useful to provide an appealing look for a Web site. However, having too many of them in a control slows down both the load time and the responsiveness of the control. Removing unnecessary images from the control would improve performance.
5. Consider disabling view state
View state is not always necessary, especially when the control is automatically populated from a data source for every request, in which scenario view state is totally unnecessary and can be disabled.
You can disable view state by setting property EnableViewState to false.