Improve Page Performance in WebGrid When Used With WebMenuBar
Recently some customers reported that they experienced performance issue in their page which contains WebGrid along with WebMenuBar control. The issue is noticable when using Internet Explorer browser to view the page. After further research, this performance issue occured only when the Grid has AutoFitColumns property set to true while the WebMenuBar is using predefined styles that produced from the server-side settings.
Apparently, Internet Explorer has a serious flaw in performance when a script is trying to add styles programmatically while loading, and at the same time when layouting is performed by other scripts.
To eliminate the performance issue, all styles in WebMenuBar should be defined as CssClass instead of using server-side predefined styles.
For comparison, I have attached two samples (with and without CssClass). Run the samples and compare the performance difference between them.
Note: This technique also works on standalone WebToolBar which causes the same issue.
Regards,
Handy.
Support Engineer.