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

RadGridView DataBinding is too slow

16 Answers 960 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Denny
Top achievements
Rank 1
Denny asked on 24 Jun 2012, 08:56 AM
Hallo,

I'm using the RadGridView for our business applications.
But our users are complaining that the data will not be loaded quickly.
So I've made ​​some comparative tests with a regular DataGrid and found out that the DataGrid binds data much faster than the RadGridView.

Loadingtime of 50000 Datarows with 8 Columns: 17 miliseconcs.
Binding to a DataGrid: 120 milliseconds. Used Memory: 7 MByte.
Binding to a RadGridView: 4 seconds. Used Memory: 51 MByte.

Are there any settings in RadGridView to get the same performance as a DataGrid?

I used following xaml for the RadGridView:

<telerik:RadGridView x:Name="RadGridView1" ShowGroupPanel="False" CanUserResizeColumns="False"  CanUserFreezeColumns="False" ItemsSource="{Binding Items, Source={StaticResource model}, Mode=OneWay}" IsReadOnly="True" AutoGenerateColumns="false"  DataLoadMode="Asynchronous" IsFilteringAllowed="False" >
           <telerik:RadGridView.Columns>
               <telerik:GridViewDataColumn DataMemberBinding="{Binding ID}" />
               <telerik:GridViewDataColumn DataMemberBinding="{Binding Col2}" />
               <telerik:GridViewDataColumn DataMemberBinding="{Binding Col3}" />
               <telerik:GridViewDataColumn DataMemberBinding="{Binding Col4}" />
               <telerik:GridViewDataColumn DataMemberBinding="{Binding Col5}" />
               <telerik:GridViewDataColumn DataMemberBinding="{Binding Col6}" />
               <telerik:GridViewDataColumn DataMemberBinding="{Binding Col7}" />
           </telerik:RadGridView.Columns>
       </telerik:RadGridView>

and following for the DataGrid:
<DataGrid ItemsSource="{Binding Items, Source={StaticResource model}}" RowHeight="25" CellStyle="{StaticResource Test}" />

16 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 25 Jun 2012, 05:56 AM
Hello Denny,

Will it be possible to remove setting DataLoadMode property and check whether the behavior is the same ?  

All the best,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Denny
Top achievements
Rank 1
answered on 25 Jun 2012, 06:26 AM
Hello Maya,

without the DataLoadMode it will be even a bit worser.
0
Denny
Top achievements
Rank 1
answered on 25 Jun 2012, 08:24 AM
Hello,

now I made another test:

Result on a Intel Core2 Quad Core 8GB RAM Win7-64bit Machine:

Loadingtime of 50000 Datarows with 8 Columns: 17 miliseconcs.
Binding to a DataGrid: 120 milliseconds. Used Memory: 7 MByte.
Binding to a RadGridView: 4 seconds. Used Memory: 51 MByte.

Result on a Intel i7 Quad Core 8GB RAM Win XP-32bit Machine:
Loadingtime of 50000 Datarows with 8 Columns: 10 miliseconcs.
Binding to a DataGrid: 80 milliseconds. Used Memory: 5 MByte.
Binding to a RadGridView: 5 seconds. Used Memory: 54 MByte.

Result on a Intel i7 Quad Core 8GB RAM Win7-64bit Machine:
Loadingtime of 50000 Datarows with 8 Columns: 10 miliseconcs.
Binding to a DataGrid: 80 milliseconds. Used Memory: 10 MByte.
Binding to a RadGridView: 1 second. Used Memory: 32 MByte.
0
Maya
Telerik team
answered on 25 Jun 2012, 08:41 AM
Hi Denny,

Will it be possible to send us a sample project illustrating the problem so that we could profile it on our side ?
Thank you in advance.  

Kind regards,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Denny
Top achievements
Rank 1
answered on 25 Jun 2012, 10:28 AM
Hi Maya,

I sent you a Support Ticket, no. 558346.
0
Maya
Telerik team
answered on 25 Jun 2012, 10:32 AM
Hello Denny,

Thank you for the sample. We will investigate it and I will let you know once we have more information about the issue. 

Kind regards,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
HAG
Top achievements
Rank 2
answered on 02 Oct 2012, 10:58 AM
Hi

We are experiencing the same issues.
Is there a solution for this problem?
0
Hristo
Telerik team
answered on 03 Oct 2012, 10:32 AM
Hello,

RadGridView offers a richer set of functionalities and a lot of visual states and this leads to differences in the initial loading. As it turns out we cannot do much in this case.


Regards,
Hristo
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Uwe
Top achievements
Rank 1
answered on 05 Oct 2012, 06:41 AM
Hi,
I thought the GridView loads only the data which are in the in the visual field or is it a misunderstanding. In the documentation is mentioned:

The RadGridViewAPI supports UI Virtualization, which processes only information that is loaded in the viewable area, which reduces the memory footprint of the application and speeds up the loading time thus additionally enhancing the UI performance.

Or what dos  processes only information that is loaded in the viewable area mean and where is the different to the performance example in the demo where one milion records are loaded. I think only the source, the SQLServer for example?

Greetings Uwe
0
Sergiy
Top achievements
Rank 1
answered on 15 Nov 2012, 11:13 AM
Hi

I am experiencing the same issues. (in case when i am using simple DataGrid all works perfectly)
Is there a solution for this problem?
0
HAG
Top achievements
Rank 2
answered on 15 Nov 2012, 12:44 PM
Hi,

if you use your gridviews only to display text, you can change the cell style like this:

<Style TargetType="telerik:GridViewCell">
   <Setter Property="Template">
         <Setter.Value>
                <ControlTemplate>
                       <TextBlock Margin="5" Text="{Binding Value, RelativeSource={RelativeSource TemplatedParent}}" />
                </ControlTemplate>
         </Setter.Value>
  </Setter>
</Style>

This gave us a performance boost.

Furthermore we noticed that our grid performance is a lot of faster with the standard theme. If you use something like the windows8 (metro) theme, the grid freezes and will need more time (up to 3 times) to load and display the data. We've already raised a ticket for this problem, So we hopefully get soon a solution or workaround.
0
Jc
Top achievements
Rank 1
answered on 06 May 2013, 06:05 AM
Hi,

Any news about this issue?
I'm experiencing the same problem, when displaying very long texts in the radgrid.

Kind regards,
JC
0
Maya
Telerik team
answered on 06 May 2013, 02:17 PM
Hi Jean-Christophe,

Could you clarify a bit - do you get degraded performance when you have long text displayed in the cells ? Which version of RadControls are you working with ? Do you set GroupRenderMode to "Flat" as suggested in our documentation ?  

Regards,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Jc
Top achievements
Rank 1
answered on 07 May 2013, 05:01 AM
Yes, when I display long text in the cells, I get degraded performances, very long time for the application to respond.
I use Q1 2013 WPF controls.
0
Maya
Telerik team
answered on 07 May 2013, 04:22 PM
Hello Jean-Christophe,

Could you try setting GroupRenderMode property of RadGridView to "Flat" ? Do you get the same performance ?  

Regards,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Jc
Top achievements
Rank 1
answered on 08 May 2013, 05:40 AM
Hello Maya,
It seems to work better now.
Thank you.
KR,
JC
Tags
GridView
Asked by
Denny
Top achievements
Rank 1
Answers by
Maya
Telerik team
Denny
Top achievements
Rank 1
HAG
Top achievements
Rank 2
Hristo
Telerik team
Uwe
Top achievements
Rank 1
Sergiy
Top achievements
Rank 1
Jc
Top achievements
Rank 1
Share this question
or