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

RadGridView DataBinding speed

1 Answer 138 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Dean
Top achievements
Rank 1
Dean asked on 13 Aug 2015, 07:46 PM

With Q2 2015 SP1 data binding ObservableCollection of a simple POCO class speed is about 25,000 per minute. Is this normal or should it be faster? It feels very slow...

With stopwatches I established that the database operation, object creation and adding to ObservableCollection takes under one second so there is no bottleneck there, it's the data binding that is slow.

The grid does display the collection items quickly and is responsive but only a subset of the items is shown and it keeps loading items and DataLoaded event keeps getting fired for each item in the collection but not as the item is added to the Observable collection, at that point the ObservableCollection is already fully populated it is firing for each item as data binding occurs apparently.

I am using ICollectionView and binding to that instead of binding directly to ObservableCollection which is speeding up the things considerably as it gets even slower when I bind directly to ObservableCollection.

As for performance degradation factors listed at http://docs.telerik.com/devtools/silverlight/controls/radgridview/troubleshooting/performance.html I do use RowStyle because I need a fixed height row and RowHeight property of the RadGridView itself is apparently only a hint because the row height gets bigger depending on the content unless MaxHeight row property is used which can't be set on the RadGridView itself and that was the only way to set the row background to transparent.

<Style x:Key="FixedHeightRgvRow" TargetType="t:GridViewRow" BasedOn={StaticResource GridViewRowStyle}">  

    <Setter Property="Background" Value="Transparent"/>    

   <Setter Property="Height" Value="24"/>    

<Setter Property="MaxHeight" Value="24"/>  </Style>

 However, even if I don't use that style the speed is the same.

 My POCO class:

 public class Log {     public int Id { get; private set; }     public DateTime Date { get; private set; }             public string ThreadName { get; private set; }     public string Level { get; private set; }     public string Logger { get; private set; }     public string Message { get; private set; }             public string Exception { get; private set; }     public Log(int id, DateTime date, string tName, string level, string logger, string msg, string ex)     {         Id = id;         Date = date;         ThreadName = tName;         Level = level;         Logger = logger;         Message = msg;         Exception = ex;     } }

 So, it's just a simple POCO class, no property change notification or anything like that...

Please advise...

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 17 Aug 2015, 04:07 PM
Hi Dean,

The loading time you are experiencing is definitely not normal. However, from the provided code I am not able to confirm what the exact cause for it might be. I set up a demo application demonstrating the normal loading behavior of RadGridView. Since you confirmed that the items are loaded in the collection you are using as an ItemsSource of the control, would it be possible for you to modify the sample project so that such performance degradation can be reproduced and send it as an attachment in a new support ticket?

Regards,
Stefan
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
GridView
Asked by
Dean
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or