Hello,
I have a user control with 2 RadGridView controls on it, code bellow. This gets loaded on the main window with a button click.
The problem I have is that there is a noticeable lag when this UserControl gets viewed on the screen 1st time. When the view changes and I go back to this view again then it's instantaneous so there is a perf degradation only at the 1st time viewing/loading it.
The perf degradation is noticeable even when there is no bindings to RadGridView columns, or even with 1 RagGridView and 1 column in the control.
I captured a perf report on VS viewing/loading this control multiple times, attached file perf.png, where you can clearly see the big CPU spike on the very first load but from there on it's not notifiable, the degradation seems to be coming from Telerik.Windows.Controls.GridView.GridViewCellsPanel.MeasureCell.
I've also looked at the troubleshooting documentation here but it didn't help.
Can you please help with my xaml bellow to see if this degradation is somehow coming from the way I've nested the GridView or defined the sizes?
I can send over a full project with a repro if needed.
Thank you!
I have a user control with 2 RadGridView controls on it, code bellow. This gets loaded on the main window with a button click.
The problem I have is that there is a noticeable lag when this UserControl gets viewed on the screen 1st time. When the view changes and I go back to this view again then it's instantaneous so there is a perf degradation only at the 1st time viewing/loading it.
The perf degradation is noticeable even when there is no bindings to RadGridView columns, or even with 1 RagGridView and 1 column in the control.
I captured a perf report on VS viewing/loading this control multiple times, attached file perf.png, where you can clearly see the big CPU spike on the very first load but from there on it's not notifiable, the degradation seems to be coming from Telerik.Windows.Controls.GridView.GridViewCellsPanel.MeasureCell.
I've also looked at the troubleshooting documentation here but it didn't help.
Can you please help with my xaml bellow to see if this degradation is somehow coming from the way I've nested the GridView or defined the sizes?
I can send over a full project with a repro if needed.
Thank you!
<
UserControl
x:Class
=
"SlowGrid.Views.UserControl1"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
d:DesignHeight
=
"610"
d:DesignWidth
=
"1000"
mc:Ignorable
=
"d"
>
<
Grid
>
<
telerik:RadDocking
Width
=
"Auto"
Height
=
"Auto"
HasDocumentHost
=
"False"
>
<
telerik:RadSplitContainer
InitialPosition
=
"DockedTop"
Orientation
=
"Vertical"
>
<
telerik:RadSplitContainer
InitialPosition
=
"DockedTop"
telerik:ProportionalStackPanel.RelativeSize
=
"250, 250"
>
<
telerik:RadPaneGroup
FontSize
=
"13"
telerik:StyleManager.Theme
=
"Summer"
>
<
telerik:RadPane
CanUserClose
=
"False"
Header
=
"a"
>
<
telerik:RadGridView
AutoGenerateColumns
=
"False"
FontSize
=
"14"
IsSynchronizedWithCurrentItem
=
"True"
RowIndicatorVisibility
=
"Collapsed"
ShowGroupPanel
=
"False"
telerik:StyleManager.Theme
=
"Summer"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
Width
=
"Auto"
Header
=
"a"
/>
<
telerik:GridViewDataColumn
Width
=
"*"
Header
=
"b"
IsReadOnly
=
"True"
/>
<
telerik:GridViewDataColumn
Width
=
"*"
Header
=
"c"
IsReadOnly
=
"True"
TextAlignment
=
"Center"
/>
<
telerik:GridViewDataColumn
Width
=
"*"
Header
=
"d"
IsReadOnly
=
"True"
TextAlignment
=
"Center"
/>
<
telerik:GridViewDataColumn
Width
=
"*"
Header
=
"e"
IsReadOnly
=
"True"
TextAlignment
=
"Center"
/>
<
telerik:GridViewDataColumn
Width
=
"*"
Header
=
"f"
IsReadOnly
=
"True"
TextAlignment
=
"Center"
/>
<
telerik:GridViewDataColumn
Width
=
"*"
Header
=
"g"
IsReadOnly
=
"True"
TextAlignment
=
"Center"
/>
<
telerik:GridViewDataColumn
Width
=
"*"
Header
=
"h"
IsReadOnly
=
"True"
TextAlignment
=
"Center"
/>
<
telerik:GridViewDataColumn
Width
=
"*"
Header
=
"i"
IsReadOnly
=
"True"
TextAlignment
=
"Center"
/>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>
</
telerik:RadPane
>
</
telerik:RadPaneGroup
>
</
telerik:RadSplitContainer
>
<
telerik:RadSplitContainer
InitialPosition
=
"DockedBottom"
telerik:ProportionalStackPanel.RelativeSize
=
"250, 750"
>
<
telerik:RadPaneGroup
FontSize
=
"13"
telerik:StyleManager.Theme
=
"Summer"
>
<
telerik:RadPane
CanUserClose
=
"False"
Header
=
"b"
>
<
StackPanel
Orientation
=
"Vertical"
>
<
telerik:RadGridView
AutoGenerateColumns
=
"False"
FontSize
=
"14"
IsReadOnly
=
"True"
IsSynchronizedWithCurrentItem
=
"True"
RowIndicatorVisibility
=
"Collapsed"
ShowGroupPanel
=
"False"
telerik:StyleManager.Theme
=
"Summer"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
Width
=
"Auto"
Header
=
"a"
/>
<
telerik:GridViewDataColumn
Width
=
"*"
Header
=
"b"
/>
<
telerik:GridViewDataColumn
Width
=
"*"
Header
=
"c"
TextAlignment
=
"Center"
/>
<
telerik:GridViewDataColumn
Width
=
"*"
Header
=
"d"
TextAlignment
=
"Center"
/>
<
telerik:GridViewDataColumn
Width
=
"*"
Header
=
"e"
TextAlignment
=
"Center"
/>
<
telerik:GridViewDataColumn
Width
=
"*"
Header
=
"f"
TextAlignment
=
"Center"
/>
<
telerik:GridViewDataColumn
Width
=
"*"
Header
=
"g"
TextAlignment
=
"Center"
/>
<
telerik:GridViewDataColumn
Width
=
"*"
Header
=
"h"
TextAlignment
=
"Center"
/>
<
telerik:GridViewDataColumn
Width
=
"*"
Header
=
"i"
TextAlignment
=
"Center"
/>
<
telerik:GridViewDataColumn
Width
=
"*"
Header
=
"j"
TextAlignment
=
"Center"
/>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>
</
StackPanel
>
</
telerik:RadPane
>
</
telerik:RadPaneGroup
>
</
telerik:RadSplitContainer
>
</
telerik:RadSplitContainer
>
</
telerik:RadDocking
>
</
Grid
>
</
UserControl
>