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