We are facing a performance problem, when using RadGrid in RadSpliiter.
We have a MasterPage with multiple RadSplitter which should resize with window. Here is the code:
The performance with only static content for this page is excellent.
Now we place a RadGrid in main Content (cphHauptInhalt).
The performance is now very very bad!
If the grid has only 100 items, it take about 4s to load, with 300 items it takes about 7s and with 700 items it takes 12s. Most of the time (round about 85%) the client works in javascript functions and the cpu is blocked with 100% load. Also if the mouse moves or the client window is resized.
I think, the performance is down because of the large DOM-Tree.
Is there a trick or anything to stop javascript calculating the whole DOM? Or is there another reason why it is so slow?
We have a MasterPage with multiple RadSplitter which should resize with window. Here is the code:
<body style="margin: 0px; height: 100%; overflow: hidden;" scroll="no"> <form id="form1" runat="server" style="height: 100%; margin: 0px" method="post"> <telerik:RadScriptManager runat="server" ID="ScriptManager" ScriptMode="Release"> </telerik:RadScriptManager> <telerik:RadStyleSheetManager runat="server" ID="StyleSheetManager"> </telerik:RadStyleSheetManager> <asp:Panel ID="panel1" runat="server" Width="100%" Height="100%" SkinID="Windows7"> <telerik:RadSplitter LiveResize="false" ID="RadSplitter1" runat="server" Height="100%" Width="100%" Orientation="Horizontal" VisibleDuringInit="false"> <telerik:RadPane ID="RadPane3" runat="server" Height="50px" Scrolling="none"> <hd:Header runat="server" ID="header" /> </telerik:RadPane> <telerik:RadPane ID="RadPane4" runat="server"> <telerik:RadSplitter LiveResize="false" ID="ContentSplitter" runat="server"> <telerik:RadPane ID="paneMenu" runat="server" Width="220"> <telerik:RadSplitter LiveResize="false" runat="server" ID="NavigationsSplitter" Orientation="Horizontal"> <telerik:RadPane ID="RadPane1" runat="server" Scrolling="None" Height="26"> <telerik:RadTextBox ID="RadTextBox4" runat="server" Width="50" /> <telerik:RadButton runat="server" ID="btnNeu" Text="Filtern" CausesValidation="false"> <Icon PrimaryIconCssClass="rbSearch" /> </telerik:RadButton> </telerik:RadPane> <telerik:RadPane runat="server" ID="TreeViewPane"> <ob:Objektbaum runat="server" ID="objektbaum" /> </telerik:RadPane> </telerik:RadSplitter> </telerik:RadPane> <telerik:RadSplitBar ID="RadSplitBar1" runat="server" /> <telerik:RadPane ID="paneInhalt" runat="server" Scrolling="None"> <telerik:RadSplitter LiveResize="false" runat="server"> <telerik:RadPane runat="server" Scrolling="None"> <div class="breadcrumb_header"> <asp:ContentPlaceHolder runat="server" ID="cpHeaderControls" /> <bc:Breadcrumb runat="server" ID="breadcrumb" /> </div> <telerik:RadSplitter LiveResize="false" runat="server"> <telerik:RadPane runat="server" Scrolling="None"> <telerik:RadSplitter LiveResize="false" runat="server" ID="srechts" Orientation="Horizontal"> <telerik:RadPane ID="RadPane2" runat="server"> <div id="content" class="div_content"> <asp:ContentPlaceHolder ID="cphHauptInhalt" runat="server"> </asp:ContentPlaceHolder> </div> </telerik:RadPane> <telerik:RadSplitBar runat="server" /> <telerik:RadPane ID="paneErrorManagement" runat="server" Height="60" Scrolling="None"> <cc1:EventViewer ID="EventViewer1" runat="server" EventClassPopupLevel="Error" VisualizeAllEventClassesThreshold="Success"> </cc1:EventViewer> </telerik:RadPane> </telerik:RadSplitter> </telerik:RadPane> </telerik:RadSplitter> </telerik:RadPane> <telerik:RadSplitBar ID="KontextSplitter" runat="server" Width="25" /> <telerik:RadPane runat="server" Width="25" Height="25" PersistScrollPosition="true"> <telerik:RadSlidingZone runat="server" ID="szrechts" Width="0" SlideDirection="Left"> <telerik:RadSlidingPane runat="server" ID="sprechts" Width="200" PersistScrollPosition="true" Height="25" IconUrl="~/images/navigation/ico_kontext.png" Scrolling="None"> <ko:Kontext runat="server" ID="kontext" /> </telerik:RadSlidingPane> </telerik:RadSlidingZone> </telerik:RadPane> </telerik:RadSplitter> </telerik:RadPane> </telerik:RadSplitter> </telerik:RadPane> </telerik:RadSplitter> </asp:Panel> </form> </body>The performance with only static content for this page is excellent.
Now we place a RadGrid in main Content (cphHauptInhalt).
<asp:Content ID="Content2" ContentPlaceHolderID="cphHauptInhalt" runat="server"> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="rgResult"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="rgResult" LoadingPanelID="RadAjaxLoadingPanel1" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" /> <telerik:RadGrid ID="rgResult" OnNeedDataSource="getDataSource" runat="server" AllowSorting="True"> <PagerStyle Mode="NumericPages" /> <MasterTableView TableLayout="Fixed" /> </telerik:RadGrid> </asp:Content>The performance is now very very bad!
If the grid has only 100 items, it take about 4s to load, with 300 items it takes about 7s and with 700 items it takes 12s. Most of the time (round about 85%) the client works in javascript functions and the cpu is blocked with 100% load. Also if the mouse moves or the client window is resized.
I think, the performance is down because of the large DOM-Tree.
Is there a trick or anything to stop javascript calculating the whole DOM? Or is there another reason why it is so slow?