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

RadGridView slow on 1st load

5 Answers 1051 Views
GridView
This is a migrated thread and some comments may be shown as answers.
arto
Top achievements
Rank 1
arto asked on 10 Jun 2014, 12:32 AM
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!


<UserControl x:Class="SlowGrid.Views.UserControl1"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             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>

5 Answers, 1 is accepted

Sort by
0
Yoan
Telerik team
answered on 12 Jun 2014, 03:17 PM
Hello,

Please ensure that RadGridView is not measured with Infinity as explained in the Degraded Performance help article. Please note that in case the UI Virtualization is disabled, then all the visual elements will be loaded once RadGridView is visualized and its items are populated. Otherwise only the visible items will be populated.

As to the performance tips we can suggest - they are listed in the Tips and Tricks help article.

However, if this does not help, could you try isolating the problem in a sample project and send it to us? We will debug it on our side and will assist you further.

Regards,
Yoan
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
arto
Top achievements
Rank 1
answered on 12 Jun 2014, 06:43 PM
I have tried the links you've posted - without success.

I do have a sample project - how can I send it over? Looks like this forum post only takes image extensions as attachments.
0
Accepted
Dimitrina
Telerik team
answered on 13 Jun 2014, 08:32 AM
Hi,

The forum threads do not allow attaching zip files, only pictures.
You can open a support ticket and attach it there.

Regards,
Didie
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Andreas
Top achievements
Rank 1
answered on 09 Feb 2015, 12:39 PM
Hello arto,

I have the same problem with a very slow first load of a view with 3 RadGridViews. Did you solve your Problem?

Thanks Andreas
0
Dimitrina
Telerik team
answered on 10 Feb 2015, 11:35 AM
Hello Andreas,

In case you still experience problems after applying the tips listed in the Tips and Tricks help article, may I ask you also check how fast is your data downloaded? You should also ensure the UI Virtualization is enabled.

Regards,
Dimitrina
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
GridView
Asked by
arto
Top achievements
Rank 1
Answers by
Yoan
Telerik team
arto
Top achievements
Rank 1
Dimitrina
Telerik team
Andreas
Top achievements
Rank 1
Share this question
or