This is a migrated thread and some comments may be shown as answers.

Radgrid grouping is very slow

4 Answers 153 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Carole
Top achievements
Rank 1
Carole asked on 05 Dec 2013, 11:04 AM
Hello,

For my webapplication I use an AJAX Radgrid with something like 15 columns and 30 000 rows.
Filtering, sorting are ok and pretty fast, but when I try to group results it become really slow, and actually with my 30 000 rows it doesn't work. The ajax call returns a 500 error.

I saw a thread on this forum explaining that Radgrid is fast enough for 300 000 rows, so I don't understand what I'm doing wrong...

I use an AJAX Radgrid with a HeaderContextMenu, linked to an EntityDataSource (but I tried with a LinqDataSource too).
On the code below I removed most of the columns for readability, it's just several common GridBoundColumn.

The Telerik.Web.UI.dll version is 2010.2.929.35, Framework .NET 3.5


<telerik:RadGrid EnableViewState="false" OnPreRender="RadGrid1_PreRender" ExportSettings-ExportOnlyData="true" ExportSettings-IgnorePaging="true" ExportSettings-Csv-ColumnDelimiter="Semicolon" DataSourceID="EntityDataSourcePesee" AutoGenerateColumns="false" ID="RadGrid1"
                Width="1604px" AllowFilteringByColumn="True" AllowSorting="True"
                ShowFooter="True" AllowPaging="true" PageSize="5" runat="server" GridLines="None" EnableLinqExpressions="false" OnItemCommand="RadGrid1_ItemCommand" OnItemCreated="RadGrid1_ItemCreated"
                Culture="fr-FR"
                EnableHeaderContextMenu="true"
                EnableHeaderContextFilterMenu="true">
                <PagerStyle Mode="NextPrevAndNumeric" NextPageToolTip="Page suivante" PrevPageToolTip="Page précédente" FirstPageToolTip="Première page" LastPageToolTip="Dernière page" PageSizeLabelText="Nombre de pesées par page :" PagerTextFormat="{4} Pesées {2} à {3} sur {5} au total" />
                <GroupingSettings CaseSensitive="false" />
 
                <MasterTableView AutoGenerateColumns="false" IsFilterItemExpanded="false" PageSize="10"
                AllowFilteringByColumn="True" ShowFooter="True" TableLayout="Auto" CommandItemDisplay="Bottom">
                    <CommandItemSettings ExportToCsvText="Exporter la sélection" ShowAddNewRecordButton="false" ShowRefreshButton="false" ShowExportToCsvButton="true" />
                    <SortExpressions>
                       <telerik:GridSortExpression FieldName="PES_DATE" SortOrder="Descending" />
                    </SortExpressions>
                    <Columns>
                        <telerik:GridBoundColumn HeaderTooltip="Trier la colonne" FilterControlWidth="50px" DataField="SITE.SIT_LIBELLE" HeaderText="Site de pesage" FilterImageToolTip="Filtrer"
                            SortExpression="it.SITE.SIT_LIBELLE" UniqueName="SIT_LIBELLE">
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn HeaderTooltip="Trier la colonne" FilterControlWidth="50px" DataField="PES_DATE_ENTREE" HeaderText="Date d'entrée de la pesée" FilterImageToolTip="Filtrer"
                            SortExpression="PES_DATE_ENTREE" UniqueName="PES_DATE_ENTREE">
                             
                            <HeaderStyle Width="160px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridBoundColumn HeaderTooltip="Trier la colonne" FilterControlWidth="50px" DataField="PES_DATE" HeaderText="Date de sortie de la pesée" FilterImageToolTip="Filtrer"
                            SortExpression="PES_DATE" UniqueName="PES_DATE"
                            >
                            <HeaderStyle Width="160px" />
                        </telerik:GridBoundColumn>
                        <telerik:GridTemplateColumn UniqueName="PES_TEMPS_PRESENCE" SortExpression="PES_TEMPS_PRESENCE" FilterImageToolTip="Filtrer"
                            InitializeTemplatesFirst="false" FilterControlToolTip="hh:mm:ss" DataType="System.String" DataField="PES_TEMPS_PRESENCE">
                            <HeaderTemplate>
                                <asp:LinkButton ToolTip="Trier la colonne" CssClass="Button" ID="btnSortTempsPresence" Text="Temps de présence (hh:mm:ss)" CommandName='Sort' CommandArgument='PES_TEMPS_PRESENCE' runat="server" />
                            </HeaderTemplate>
                            <ItemTemplate>
                                <%# formatTempsPresence((int?)Eval("PES_TEMPS_PRESENCE")) %>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                        <telerik:GridBoundColumn HeaderTooltip="Trier la colonne" FilterControlWidth="30px" DataField="PES_NUM_BON" HeaderText="N° Bon de pesée" FilterImageToolTip="Filtrer"
                            SortExpression="PES_NUM_BON" UniqueName="PES_NUM_BON">
                        </telerik:GridBoundColumn>
 
....
 
                    </Columns>
                </MasterTableView>
                <ClientSettings>
                    <Scrolling AllowScroll="false" />
                    <ClientEvents OnFilterMenuShowing="FilterMenuShowing" />
                </ClientSettings>
            </telerik:RadGrid>
         
           <asp:EntityDataSource ID="EntityDataSourcePesee" runat="server" ConnectionString="name=PeseesEntities"
              DefaultContainerName="PeseesEntities" EntitySetName="PESEE" Include="SITE"
              EnableUpdate="false" EnableDelete="false" EnableInsert="false">     
            </asp:EntityDataSource>

4 Answers, 1 is accepted

Sort by
0
Carole
Top achievements
Rank 1
answered on 09 Dec 2013, 09:53 AM
Hello,
I still have the problem. Isn't there anyone that could help me to understand what's happenning ?
0
Radoslav
Telerik team
answered on 10 Dec 2013, 09:29 AM
Hi Carole,

Could you please try setting the RadGrid.EnableLinqExpressions to true and let me know if the issues still persists. Since Q3 2011 release we had a new Linq based grouping which is turned on by default. This type of grouping has a huge performance optimization and internally uses Dynamic Linq for grouping. Also this grouping is controlled by the RadGrid. EnableLinqExpressions and  MasterTableView.EnableLinqGrouping properties (default values are "true"). More information you could find here:
http://blogs.telerik.com/aspnet-ajax/posts/11-11-08/super-charged-performance-optimizations-for-telerik-s-asp-net-ajax-grid-in-q3-2011.aspx

Looking forward for your reply.

Regards,
Radoslav
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Carole
Top achievements
Rank 1
answered on 10 Dec 2013, 03:34 PM
Hi Radoslav,
thanks for your reply.
I'm afraid turning on EnableLinqExpressions is not enough :(
My Telerik.UI version is 2010.2 so I suppose that's why it doesn't resolve the problem.

Do you have others tips that could improve the grouping function for this version ?
0
Radoslav
Telerik team
answered on 13 Dec 2013, 07:21 AM
Hello Carole,

Unfortunately there is not much that you can do in order to increase the performance of the grouping in your case. I strongly suggest you to upgrade to the latest version of our controls where the grouping is taking advantage of the new linq grouping mechanism. Also in your case to increase the performance you can try applying some of the suggested approaches into the following documentation article:
http://www.telerik.com/help/aspnet-ajax/introduction-optimizing-output-page-load-time-using-radscriptmanager-radstylesheetmanager.html

I hope this helps.

Regards,
Radoslav
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Grid
Asked by
Carole
Top achievements
Rank 1
Answers by
Carole
Top achievements
Rank 1
Radoslav
Telerik team
Share this question
or