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

Performance Issue with GridView inside TileView

12 Answers 149 Views
TileView
This is a migrated thread and some comments may be shown as answers.
Ruben Hakopian
Top achievements
Rank 1
Ruben Hakopian asked on 25 Jun 2010, 11:54 PM
Hi,

I have encountered a performance issue when adding gridView inside RadTileItem.
CPU starts spinning and process starts to consume lots of memory, until it reaches 2GBs and eventually crashes.

Attached is a snippet from a demo application which presents a standalone gridview performance (which works fine), and the same gridview inside RadTileItem.

XAML:
        <telerik:RadTileView Grid.Row="1">  
            <telerik:RadTileViewItem Header="ABC">  
                  
                <telerik:RadFluidContentControl>                      
                    <telerik:RadFluidContentControl.Content> 
                        <TextBlock Text="Maximize this tile." /> 
                    </telerik:RadFluidContentControl.Content> 
                      
                    <telerik:RadFluidContentControl.SmallContent> 
                        <TextBlock Text="Maximize this tile." /> 
                    </telerik:RadFluidContentControl.SmallContent> 
                      
                    <telerik:RadFluidContentControl.LargeContent> 
 
 
    <Grid> 
        <Grid.RowDefinitions> 
            <RowDefinition Height="Auto" /> 
            <RowDefinition /> 
        </Grid.RowDefinitions> 
 
        <Button Height="20" Content="Generate" Click="Button_Click" /> 
 
        <telerik:RadGridView Name="telerikGrid" Grid.Row="1" 
                             ItemsSource="{Binding Persons, Mode=OneWay}" 
                             IsReadOnly="True" 
                             AutoGenerateColumns="False">  
            <telerik:RadGridView.Columns> 
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=ID, Mode=OneWay}" Header="ID" IsGroupable="False" IsFilterable="False"  /> 
                <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=Name, Mode=OneWay}" Header="Name" IsGroupable="False" IsFilterable="False"  /> 
            </telerik:RadGridView.Columns> 
        </telerik:RadGridView> 
    </Grid> 
                    </telerik:RadFluidContentControl.LargeContent>                      
                </telerik:RadFluidContentControl> 
                  
            </telerik:RadTileViewItem> 
        </telerik:RadTileView> 

Code Behind:

    public partial class GridControl : UserControl  
    {  
        public GridControl()  
        {  
            InitializeComponent();  
            this.DataContext = new ViewModel();  
        }  
 
        private void Button_Click(object sender, RoutedEventArgs e)  
        {  
            var list = new List<Person>();  
            for (int i = 0; i < 10000; i++)  
            {  
                list.Add(new Person(i, "abc"));  
            }  
            (this.DataContext as ViewModel).Persons = list;  
        }  
    }  
 
    public class ViewModel : INotifyPropertyChanged  
    {  
        private List<Person> _persons = null;  
 
        public List<Person> Persons  
        {  
            get { return _persons; }  
            set { _persons = value; OnPropertyChanged("Persons"); }  
        }
        #region INotifyPropertyChanged Members  
 
        public event PropertyChangedEventHandler PropertyChanged;  
        private void OnPropertyChanged(string propertyName)  
        {  
            if (PropertyChanged != null)  
                PropertyChanged(thisnew PropertyChangedEventArgs(propertyName));  
        }
        #endregion  
    }  
 
    public class Person  
    {  
        private int _id;  
        private string _name;  
 
        public Person(int id, string name)  
        {  
            _id = id;  
            _name = name;  
        }  
 
        public int ID  
        {  
            get { return _id; }  
        }  
 
        public string Name  
        {  
            get { return _name; }  
        }  
 
    } 



Thank you very much,

Ruben.

12 Answers, 1 is accepted

Sort by
0
Kiril Stanoev
Telerik team
answered on 29 Jun 2010, 01:53 PM
Hi Ruben,

Thank you for reporting this issue. In fact, the issue is caused by the RadFluidContentControl. For some reason it takes more time for an ItemsControl to generate its ItemsSource when in RadFluidContentControl rather than not being in RadFluidContentControl. I've added this issue in our public issue tracking system and we will do our best to fix it as soon as possible. The name of the item in the public issue tracking system is "FluidContentControl: Performance issue when and ItemsControl generates its items" and it will be available for tracking and voting tomorrow the latest. Let me know how I can be of further assistance.

Regards,
Kiril Stanoev
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
rubenhak
Top achievements
Rank 1
answered on 29 Jun 2010, 05:19 PM
HI Kiril,

Thank you for submitting the bug. Can you provide a time frame when this issue will be resolved?
Currently this issue is a show stopper for our product, which is supposed to be released soon.

Thank you very much!

Ruben.
0
Kiril Stanoev
Telerik team
answered on 01 Jul 2010, 05:17 PM
Hi Ruben,

we have an official release in two weeks. We will do our best to include a fix, but we can't promise that it will be fixed until then. You can track the issue status here.

Greetings,
Kiril Stanoev
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
rubenhak
Top achievements
Rank 1
answered on 01 Jul 2010, 05:29 PM
Hi,

Can you guys provide the source code for FluidContentControl?
I may try to do some tricks and try to fix it.

Thank you,
Ruben.
0
Kiril Stanoev
Telerik team
answered on 04 Jul 2010, 04:26 PM
Hi Ruben,

I found a quick workaround which you might want to use while we investigate the actual cause for the issue.
Setting explicit size (Width, Height, MaxWidth or MaxHeight) to the root panel in the LargeContent will significantly boost the time RadGridView generates its items.

<telerikNavigation:RadTileView Grid.Row="1">
    <telerikNavigation:RadTileViewItem Header="ABC">
        <telerik:RadFluidContentControl>
            <telerik:RadFluidContentControl.SmallContent>
                <TextBlock Text="Maximize this tile." />
            </telerik:RadFluidContentControl.SmallContent>
            <telerik:RadFluidContentControl.Content>
                <TextBlock Text="Maximize this tile." />
            </telerik:RadFluidContentControl.Content>
            <telerik:RadFluidContentControl.LargeContent>
                <!--<Grid MaxWidth="1500" MaxHeight="1500">-->
                <Grid Width="1024" Height="768">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition />
                    </Grid.RowDefinitions>
                    <Button Height="20" Content="Generate" Click="Button_Click" />
                    <telerikGridView:RadGridView Name="telerikGrid" Grid.Row="1"
                            ItemsSource="{Binding Persons, Mode=OneWay}" IsReadOnly="True"
                            AutoGenerateColumns="False">
                        <telerikGridView:RadGridView.Columns>
                            <telerikGridView:GridViewDataColumn
                                    DataMemberBinding="{Binding Path=ID, Mode=OneWay}"
                                    Header="ID" IsGroupable="False" IsFilterable="False" />
                            <telerikGridView:GridViewDataColumn
                                    DataMemberBinding="{Binding Path=Name, Mode=OneWay}"
                                    Header="Name" IsGroupable="False" IsFilterable="False" />
                        </telerikGridView:RadGridView.Columns>
                    </telerikGridView:RadGridView>
                </Grid>
            </telerik:RadFluidContentControl.LargeContent>
        </telerik:RadFluidContentControl>
    </telerikNavigation:RadTileViewItem>
</telerikNavigation:RadTileView>

Give it a try and let me know if this will work for the moment.

Regards,
Kiril Stanoev
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
rubenhak
Top achievements
Rank 1
answered on 06 Jul 2010, 06:31 PM
Kirill,

Thanks for the workaround. How do i know what should be the size of the grid? Do you know if there is a way to make it fit available space? If the window is being resized I might need to resize the grid so it does not get out of the boundaries.

Thanks,
Ruben.
0
Accepted
Kiril Stanoev
Telerik team
answered on 07 Jul 2010, 07:44 AM
Hi Ruben,

We managed to resolve the issue with RadFluidContentControl. The fix will be available with our official Q2 release. As for the moment, simply set MaxWidth="1500" and MaxHeight="1500" (or some other large value) and see which one suits you most. I don't think that your GridView will exceed more than 1500x1500 px. Setting MaxWidth and MaxHeight will improve the performance and is a valid workaround until you get the release binaries.

Kind regards,
Kiril Stanoev
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
rubenhak
Top achievements
Rank 1
answered on 07 Jul 2010, 05:54 PM
Hi Kiril,

Thank you guys very much! Looking forward to get the new version of your products.
When is the Q2 release scheduled?

Thanks,
Ruben.
0
Valentin.Stoychev
Telerik team
answered on 07 Jul 2010, 05:59 PM
Hello rubenhak,

The release will be next week.

Kind regards,
Valentin.Stoychev
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
rubenhak
Top achievements
Rank 1
answered on 07 Jul 2010, 06:01 PM
Hi Valentin,

Sound perfect to me!

Thanks,
Ruben

0
Jorge Alberto
Top achievements
Rank 1
answered on 13 Jul 2010, 03:18 AM
Hello 

I have the same problem, does the latest release comes with the fix for this issue?

Best Regards
0
Kiril Stanoev
Telerik team
answered on 15 Jul 2010, 10:02 AM
Hi Jorge,

Yes, the latest release includes the fix. Download our latest binaries, give them a try and let us know if you encounter the same issue again.

Regards,
Kiril Stanoev
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
Tags
TileView
Asked by
Ruben Hakopian
Top achievements
Rank 1
Answers by
Kiril Stanoev
Telerik team
rubenhak
Top achievements
Rank 1
Valentin.Stoychev
Telerik team
Jorge Alberto
Top achievements
Rank 1
Share this question
or