Hi all,
I am facing some performance issues and am a bit puzzled. I am sure I am missing something and would appreciate any suggestions.
I am using telerik WPF dlls with version 2009.2.0813.35.
The scenario is I am loading around 2000 objects. It takes almost 30 seconds to render. I assume by default it is using the virtualizing panel and looking at the profiler that seems to be the case.
I am pasting the profiler output here. The problem seems to be the UpdateRowHeight call in the GridViewVirtualizingPanel where it seems to go through all the records even though the UI is virtualized.
61.08 % MeasureOverride - 18728 ms - 0 calls - Telerik.Windows.Controls.GridView.BaseVirtualizingPanel.MeasureOverride(Size)
61.08 % UpdateRowHeight - 18728 ms - 0 calls - Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.UpdateRowHeight(IRowItem)
61.08 % OnRefreshScrollExtent - 18728 ms - 0 calls - Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.OnRefreshScrollExtent()
61.08 % RefreshItemsPhysicalHeightsCache - 18728 ms - 0 calls - Telerik.Windows.Controls.GridView.GridView.Scrolling.PhysicalHeightsCache.RefreshItemsPhysicalHeightsCache()
61.08 % CreateDataRecordsHeightsCache - 18728 ms - 0 calls - Telerik.Windows.Controls.GridView.GridView.Scrolling.PhysicalHeightsCache.CreateDataRecordsHeightsCache(IList<Record>, Double, Int32, Int32)
61.08 % InsertItem - 18728 ms - 0 calls - Telerik.Windows.Controls.GridView.GridView.Scrolling.RadKeyedCollection<TKey, TItem>.InsertItem(Int32, TItem)
61.08 % AddKey - 18728 ms - 0 calls - Telerik.Windows.Controls.GridView.GridView.Scrolling.RadKeyedCollection<TKey, TItem>.AddKey(TKey, Int32)
30.93 % System.Collections.Generic.Dictionary<TKey, TValue>.FindEntry... - 9484 ms - 0 calls
30.15 % System.Collections.Generic.Dictionary<TKey, TValue>.Insert... - 9245 ms - 0 calls
-------------------------------------------------------------------------------------------------------------------------------
Is this a known thing or am I doing something wrong? The xaml fragment is below:
<telerik:RadGridView Name="OfficerGrid" AutoGenerateColumns="False" IsReadOnly="True"
MultipleSelect="False" ShowGroupPanel="False"
IsFilteringAllowed="False"
SelectionChanged="OnSelectionChanged" DataLoadMode="Asynchronous"
GridLinesVisibility="None"
MouseDoubleClick="OfficerGrid_MouseDoubleClick">
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn Header="Name" DataMemberBinding="{Binding Path=Name, Mode=OneWay}"/>
<telerik:GridViewDataColumn Header="Office" DataMemberBinding="{Binding Path=Office, Mode=OneWay}"/>
<telerik:GridViewDataColumn Header="Job Title" DataMemberBinding="{Binding Path=JobTitle, Mode=OneWay}"/>
</telerik:RadGridView.Columns>
</telerik:RadGridView>
Thanks for any help,
Kashi
I am facing some performance issues and am a bit puzzled. I am sure I am missing something and would appreciate any suggestions.
I am using telerik WPF dlls with version 2009.2.0813.35.
The scenario is I am loading around 2000 objects. It takes almost 30 seconds to render. I assume by default it is using the virtualizing panel and looking at the profiler that seems to be the case.
I am pasting the profiler output here. The problem seems to be the UpdateRowHeight call in the GridViewVirtualizingPanel where it seems to go through all the records even though the UI is virtualized.
61.08 % MeasureOverride - 18728 ms - 0 calls - Telerik.Windows.Controls.GridView.BaseVirtualizingPanel.MeasureOverride(Size)
61.08 % UpdateRowHeight - 18728 ms - 0 calls - Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.UpdateRowHeight(IRowItem)
61.08 % OnRefreshScrollExtent - 18728 ms - 0 calls - Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.OnRefreshScrollExtent()
61.08 % RefreshItemsPhysicalHeightsCache - 18728 ms - 0 calls - Telerik.Windows.Controls.GridView.GridView.Scrolling.PhysicalHeightsCache.RefreshItemsPhysicalHeightsCache()
61.08 % CreateDataRecordsHeightsCache - 18728 ms - 0 calls - Telerik.Windows.Controls.GridView.GridView.Scrolling.PhysicalHeightsCache.CreateDataRecordsHeightsCache(IList<Record>, Double, Int32, Int32)
61.08 % InsertItem - 18728 ms - 0 calls - Telerik.Windows.Controls.GridView.GridView.Scrolling.RadKeyedCollection<TKey, TItem>.InsertItem(Int32, TItem)
61.08 % AddKey - 18728 ms - 0 calls - Telerik.Windows.Controls.GridView.GridView.Scrolling.RadKeyedCollection<TKey, TItem>.AddKey(TKey, Int32)
30.93 % System.Collections.Generic.Dictionary<TKey, TValue>.FindEntry... - 9484 ms - 0 calls
30.15 % System.Collections.Generic.Dictionary<TKey, TValue>.Insert... - 9245 ms - 0 calls
-------------------------------------------------------------------------------------------------------------------------------
Is this a known thing or am I doing something wrong? The xaml fragment is below:
<telerik:RadGridView Name="OfficerGrid" AutoGenerateColumns="False" IsReadOnly="True"
MultipleSelect="False" ShowGroupPanel="False"
IsFilteringAllowed="False"
SelectionChanged="OnSelectionChanged" DataLoadMode="Asynchronous"
GridLinesVisibility="None"
MouseDoubleClick="OfficerGrid_MouseDoubleClick">
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn Header="Name" DataMemberBinding="{Binding Path=Name, Mode=OneWay}"/>
<telerik:GridViewDataColumn Header="Office" DataMemberBinding="{Binding Path=Office, Mode=OneWay}"/>
<telerik:GridViewDataColumn Header="Job Title" DataMemberBinding="{Binding Path=JobTitle, Mode=OneWay}"/>
</telerik:RadGridView.Columns>
</telerik:RadGridView>
Thanks for any help,
Kashi