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

Deteriorating performance with increasind number of properties

7 Answers 25 Views
PropertyGrid
This is a migrated thread and some comments may be shown as answers.
Weicong
Top achievements
Rank 1
Weicong asked on 16 Dec 2013, 04:14 PM
We have a single Property grid with around 83 properties. When the item on the property grid changes, it takes almost 400 ms to just set the new item to the property grid. 

I tried a test application and saw that with the number of proeprties increasing, the performance of the property grid gradually deteriorates.
Attached is a screenshot of the performance profile taken. Please help analyze and suggest how this can be improved. 

Please note: IsVirtualizing and EnableEditorCaching are enabled.

7 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 18 Dec 2013, 09:04 AM
Hi Weicong,

Can you try setting RenderMode property to "Flat"? Do you get the same performance ? Also, is your property grid placed in a control measuring its children with infinity ?

Regards,
Maya
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Weicong
Top achievements
Rank 1
answered on 18 Dec 2013, 01:12 PM
RenderMode=Flat does not improve the performance. 
Also the container for the propertyGrid is a Grid, as far as I understand it does not measure it children to infinity. Tried with DockPanel and that doesnot do it either. 

0
Maya
Telerik team
answered on 18 Dec 2013, 03:29 PM
Hello Weicong, 

It is strange that you get such performance as RadPropertyGrid works pretty great with a bit more properties displayed (as you can see in our demos). Is there anything more specific that you do ? What are your exact settings and definition of the property grid ?

Regards,
Maya
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Weicong
Top achievements
Rank 1
answered on 18 Dec 2013, 03:48 PM
This is the test app xaml: 
  <DockPanel>
    <Button DockPanel.Dock="Bottom" Click="ButtonBase_OnClick" Content="Change"></Button>
    <telerik:RadPropertyGrid Item="{Binding}" AutoGeneratePropertyDefinitions="True"/>
  </DockPanel>


And the code is: 

      Person1 = new Person() { Age = 1, FirstName = "FN1", Gender = "F", LastName = "LN1" };
      Person2 = new Person() { Age = 2, FirstName = "FN2", Gender = "F2", LastName = "LN2" };

On button click  :
      if (DataContext == null)
        DataContext = Person1;
      else if (DataContext as Person == Person1)
        DataContext = Person2;
      else if (DataContext as Person == Person2)
        DataContext = Person1;


The time taken to change the Item increases with the increase in properties in Person object. 
I see the ProeprtyGridField is created everytime the Item changes, rather than just updating the values for the property.

0
Maya
Telerik team
answered on 19 Dec 2013, 08:12 AM
Hello Weicong,

Can you try placing RadPropertyGrid in a Grid for example instead of DockPanel ? Do you get the same performance ?


Regards,
Maya
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Weicong
Top achievements
Rank 1
answered on 19 Dec 2013, 05:06 PM
Hi Maya, 
No change in performance with the change in the panel.

Can you look at the stack trace I attached with the first email and try to see why that happens at all?
Can you please check why the PropertyGridField is recreated even when the property definition does not change? And why we just do not update the value?

And may be could you also check - irrespective of the Panel, why does the control behave that slowly?

Thanks,
Shweta
0
Maya
Telerik team
answered on 23 Dec 2013, 09:27 AM
Hi Weicong,

Will it possible to try one more thing in your application ? Could you call SuspendMethod() of PropertyDefinitions collection, change the Item and call ResumeNotifications afterwards ? Are there any changes ? 

Regards,
Maya
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
PropertyGrid
Asked by
Weicong
Top achievements
Rank 1
Answers by
Maya
Telerik team
Weicong
Top achievements
Rank 1
Share this question
or