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

radgridview slow databinding

17 Answers 295 Views
GridView
This is a migrated thread and some comments may be shown as answers.
joao rodrigues
Top achievements
Rank 1
joao rodrigues asked on 28 Apr 2010, 05:23 PM
Hi,

I'm evaluating silverlight controls comparing telerik and others and my major concern has to be with the gridview component since in Bussiness Apps is a fundamental component.

I'm using the radgridview in three screnarios for loading 2000 recs x 15 cols using RIA services :
1 - xaml only :

 

 

 

<my1:RadGridView Name="rgv1" AutoExpandGroups="True" ItemsSource="{Binding Data, ElementName=dataDomainDataSource}" />

 


2- xaml + Code (bind after load)

<my1:RadGridView Name="RadGrid1" AutoExpandGroups="True"/>

+

CFDomainContext ctx = new CFDomainContext();

 

ctx.Load(ctx.GetVEntitiesQuery());

+

 

 

private void Button_Click_3(object sender, System.Windows.RoutedEventArgs e)

 

{

RadGrid1.ItemsSource = ctx.VEntities;

}


3 - xaml + Code (databind):

<

 

 

my1:RadGridView Name="RadGrid1" AutoExpandGroups="True"

 

 

 

ItemsSource="{Binding Path=VEntities}"/>

 

+

 

 

CFDomainContext ctx = new CFDomainContext();

 

this

 

 

.DataContext = ctx;

 

ctx.Load(ctx.GetVEntitiesQuery());

 

 

The first scenario takes about 4 secs, what is good.

The second scenario takes about 2 seconds to perform the load (RIA) and less than 2 seconds to show the data (RadGrid1.ItemsSource = ctx.VEntities;) what is excelent!

The third scenario is my big problem, the system takes more than 15 Seconds to perform the load...

My first conclusion was "OK, I made a mistake" (and I still think that :) but when i perform the same test with other grid component that I'm evaluating also (infragistics) the process (third scenario) takes about 5 seconds...

Can you help me with that ?

Thank you,
Joao

17 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 29 Apr 2010, 07:04 AM
Hi Joao,

Not sure why you have such problems however you can check my blog post to know more about the grid performance with WCF Ria services and almost 2 million records.

Kind regards,
Vlad
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
joao rodrigues
Top achievements
Rank 1
answered on 30 Apr 2010, 10:38 AM

Thank you for your response Vlad.

Your example reflects almost exacly my 1st scenario and the performance is in fact great.

My problem is the 3rd scenario:
 
<my1:RadGridView Name="RadGrid1" AutoExpandGroups="True" ItemsSource="{Binding Path=VEntities}"/>
---
CFDomainContext
ctx = new CFDomainContext();

this.DataContext = ctx;

 

ctx.Load(ctx.GetVEntitiesQuery());
---
Here I bound the ItemsSource to an EntitySet and on load event I call the Load method to fill the entity set.
I don't know the RadGrid internals but I can imagine that it is doing some processing every time an record is added to EntitySet since the entityset bound to grid ...Maybe I'm wrong...

Any Ideas ?

0
joao rodrigues
Top achievements
Rank 1
answered on 30 Apr 2010, 01:07 PM

Vlad,

I've download your RIA Project and made some minor changes to reproduced the behavior.

I've made it available here  

1  - in SilverlightApplication1.Web.NorthwindDomainService.cs (Line 146)
2 - In SilverlightApplication1. MainPage.xaml

Thank you,
joao

0
Accepted
Vlad
Telerik team
answered on 30 Apr 2010, 01:43 PM
Hi Joao,

Indeed you are right. I've modified your project to illustrate you how to overcome this. You can find the project attached.

Don't hesitate to contact us if you have other questions.


Best wishes,
Vlad
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
joao rodrigues
Top achievements
Rank 1
answered on 30 Apr 2010, 02:38 PM
Hi Vlad,

Your solution worked perfectly!

And to be honest I now understand why the previous implementation was slow.

Yet, let me say that I would love if RIA (or INotifyCollectionChanged) and RadGrid could have a smother conversation like :

  • RIA : Hey, I'll start to update the EntitySet.
  • RADGrid: Ok, I'll wait for you to finish.
  • RIA: Hey, I've finished updating the Entity set.
  • RADGrid: Ok, let me hurry up to update myself.

Well, maybe in the future they have... :)

Vad, Thank you very much!


0
Arcadia_User
Top achievements
Rank 1
answered on 04 Oct 2010, 06:53 PM

I am evaluating Grid now and I have the same problem. We are going to move from Silverlight Toolkit grid (which is free, fast, and stable, but seriously lacks features) to some commercial grid.

Grid is bound to EntitySet with ~1000 records, and browser freezes for 4 seconds when data finishes loading (and I have 3.2GHz Core 2 Duo. Our customers use notebooks with slower processors). This is not an issue with Toolkit grid and Syncfusion grid.

Situation is many times worse if I have pre-defined GroupDescriptor.

I see that solution is to bind grid AFTER data has been loaded, but this looks like a bad workaround (EtitySet implements INotifyCollectionChanged, why should I care) and not always easy to do (I have multiple queries loading and tracking all of them would be a pain).

This thing is the only concern about Telerik grid by far; other things look perfect. Is there any chance that it will be fixed?

0
Vlad
Telerik team
answered on 05 Oct 2010, 09:36 AM
Hi Pavel,

 Can you send us your application (via support ticket) to check locally what is going on?

Sincerely yours,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Arcadia_User
Top achievements
Rank 1
answered on 05 Oct 2010, 11:22 AM
Support ticket with sample application added (354351)
0
Vlad
Telerik team
answered on 05 Oct 2010, 12:21 PM
Hello Pavel,

 I've checked the project attached to the support ticket however I'm unable to run it since your are using old version (not the official one) of RIA Services. I've noticed however that grids in your case are inside StackPanel which will measure the grid with infinity height .In this case the grid virtualization will be off and all rows will be created at once. If you to get more info about the performance of RadGridView and RadDataPager bound to WCF RIA Services you can check my blog post

All the best,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Arcadia_User
Top achievements
Rank 1
answered on 05 Oct 2010, 01:00 PM

Sorry, I've attached completely wrong archive. I've added correct one to the case reply.

Grid is not in StackPanel, and explicit height does not help also. (See MainPage.xaml)

Pager is not suitable for us, we need grid to display (group, sort, filter) up to 3000-5000 records at once (column count around 10). This is not so much I think. Toolkit grid handles this pretty well. Telerik grid does this also well, except this one freeze when EtitySet gets populated. This is really the only concern.

0
Vlad
Telerik team
answered on 05 Oct 2010, 03:15 PM
Hello Pavel,

 I've reviewed your new project and now I see your point. We've found the problem immediately and we will do our best to fix it as soon as possible - unfortunately I'm not sure if we will make it for our upcoming latest build (this Friday).

You can track the issue here - I've added 3000 Telerik points to your account. 

Greetings,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Vlad
Telerik team
answered on 06 Oct 2010, 09:30 AM
Hi Pavel,

 Just to let you know that this issue was resolved successfully and the fix will be part of our upcoming latest build this Friday. 

Kind regards,
Vlad
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Arcadia_User
Top achievements
Rank 1
answered on 06 Oct 2010, 09:31 AM
This is just great, thank you!
0
Evaluator
Top achievements
Rank 1
answered on 18 Feb 2011, 11:35 AM
Could this solution be explained? Downloading two different solutions are digging through the differences is going to be a bit painful.
0
Vlad
Telerik team
answered on 18 Feb 2011, 12:20 PM
Hello,

 There was an issue reported in this thread which is already fixed several moths ago. 

Greetings,
Vlad
the Telerik team
0
KI performance
Top achievements
Rank 1
answered on 12 Jun 2013, 02:47 PM
Hi there,
i have a similar problem with slow data binding in a radgridview :/

i have a page with two gridviews. one is collapsed, one is visible. in each grid are ~25 - 30 Rows and ~14 Colums! 

i have 2 viewmodels for each grid and i`m binding a static ObservableCollection with custom Itemclasses(~14 properties, just strings, few datetimes, few ints) on the itemsources.

to render the page with all 14 columns, it takes ~2secounds...with one column its fast!

its a blank gridview with autogeneratedcolums=true. 

some hinds?

Greetings

PageConstructor:
if (retailersViewModel == null)
            {
                retailersViewModel = this.Resources["retailersViewModelView"] as RetailersViewModel;              
                retailerDataGrid.ItemsSource = retailersViewModel.RetailersViewCollection;
            }

<telerik:RadGridView  x:Name="retailerDataGrid"
                      Visibility="Visibile"
                      AutoGenerateColumns="True"
                      Margin="0,50,0,50"  >

0
Dimitrina
Telerik team
answered on 17 Jun 2013, 01:37 PM
Hello,

Generally related to performance I would suggest you to check this help article.
Then I must mention that the first time when the control is opened, there are many visuals to be loaded and this takes time. So I can also suggest you to use NoXaml binaries and Implicit Styles as explained in our online documentation

Regards,
Didie
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
joao rodrigues
Top achievements
Rank 1
Answers by
Vlad
Telerik team
joao rodrigues
Top achievements
Rank 1
Arcadia_User
Top achievements
Rank 1
Evaluator
Top achievements
Rank 1
KI performance
Top achievements
Rank 1
Dimitrina
Telerik team
Share this question
or