RadGridView DataBinding is too slow

17 posts, 0 answers
  1. Denny
    Denny avatar
    5 posts
    Member since:
    Sep 2011

    Posted 24 Jun 2012 Link to this post

    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}" />
  2. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 25 Jun 2012 Link to this post

    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 >>

  3. Denny
    Denny avatar
    5 posts
    Member since:
    Sep 2011

    Posted 25 Jun 2012 Link to this post

    Hello Maya,

    without the DataLoadMode it will be even a bit worser.
  4. Denny
    Denny avatar
    5 posts
    Member since:
    Sep 2011

    Posted 25 Jun 2012 Link to this post

    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.
  5. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 25 Jun 2012 Link to this post

    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 >>

  6. Denny
    Denny avatar
    5 posts
    Member since:
    Sep 2011

    Posted 25 Jun 2012 Link to this post

    Hi Maya,

    I sent you a Support Ticket, no. 558346.
  7. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 25 Jun 2012 Link to this post

    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 >>

  8. HAG
    HAG avatar
    7 posts
    Member since:
    Feb 2009

    Posted 02 Oct 2012 Link to this post

    Hi

    We are experiencing the same issues.
    Is there a solution for this problem?
  9. Hristo
    Admin
    Hristo avatar
    408 posts

    Posted 03 Oct 2012 Link to this post

    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.

  10. Uwe
    Uwe avatar
    49 posts
    Member since:
    Sep 2012

    Posted 05 Oct 2012 Link to this post

    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
  11. Sergiy
    Sergiy avatar
    38 posts
    Member since:
    Jan 2012

    Posted 15 Nov 2012 Link to this post

    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?
  12. HAG
    HAG avatar
    7 posts
    Member since:
    Feb 2009

    Posted 15 Nov 2012 Link to this post

    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.
  13. Jc
    Jc avatar
    25 posts
    Member since:
    Sep 2012

    Posted 06 May 2013 Link to this post

    Hi,

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

    Kind regards,
    JC
  14. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 06 May 2013 Link to this post

    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.

  15. Jc
    Jc avatar
    25 posts
    Member since:
    Sep 2012

    Posted 07 May 2013 Link to this post

    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.
  16. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 07 May 2013 Link to this post

    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.

  17. Jc
    Jc avatar
    25 posts
    Member since:
    Sep 2012

    Posted 08 May 2013 Link to this post

    Hello Maya,
    It seems to work better now.
    Thank you.
    KR,
    JC
Back to Top