Hi,
I am debugging a performance issue with XamDataGrid (v.16.1.20161.1000) and one of the most significant call is in VerifySort in XamDataGrid. I am trying to figure out how to avoid this call. My grid does not have any sorting on. When I created a sample app, I did not see this call so there must be some setting that set it off. I cannot share the production code for confidentiality reason, does anyone know if there is a setting that can turn off this call?
Hello,
The VerifySort is called when sorting is applied. Please note that when records are grouped they are first sorted so if you group by specific fields this will call the VerifySort as well.
May be if you share more details about the performance issue with XamDataGrid on your side I could assist you with more specific information.
Let me know if you have any questions.
Ah grouping that was what it is. Thank you very much for your reply.
We tested reloading a grid in a test application. We found that OnSourceCollectionReset calls VerifySort. When reloading the grid, VerifySort seems to be very expensive almost by 3x in our testing if all the records in the grid are expanded vs if all records are collapsed. See the attached stack trace.
We will upload the test application soon. In the mean time can you please investigate the attached stack trace. We have a usecase to display 10,000 records with nested records and all records expanded. At the moment it is taking upto 24 seconds to reload the grid. Of 24 seconds , 22 seconds is taken by VerifySort.
Hello Vaibhab,From your description it seems that the XamDataGrid is loaded without a delay the first time and the delay comes when the datasource is reset. Is that correct? The best option to assist you with this is to investigate the sample project that you have mentioned. Please feel free to upload it when ready.If the issue is reproducible only when the records are expanded, it could be the virtualization of the records that is causing the performance hit. The virtualization is turned off when the control is located in a container which measures its content elements with infinite height e.g. StackPanel, ScrollViewer.
Hello Vaibhav,
The FieldLayoutCollection.GetPropertyDescriptorProvider() method is used to get the PropertyDescriptors for an object in order to create the FieldLayout. The other methods related to sorting and grouping are also used in the exporting functionality of the XamDataGrid to determine the state of the control.
The best way to assist you further on this will be if you can isolate the behavior and share a sample application where the performance hit is reproducible. You can also test with the latest service release of version 16.1 – 16.1.20161.2231 if he issue is still reproducible.
We are using 16.1.20161.1000
Update on the sample application : We are able to get the same stack as shown above in the dotTrace profiling snapshot by setting DataPresenter.SortRecordsByDataType = true. However in our sample application GetPropertyDescriptorProvider doesn't take that much time. So still not sure what that function does and why in our prod application it is costly.
Can you also explain the usage of the following :
1) FieldLayoutCollection.GetPropertyDescriptorProvider()
2) DataPresenter.SortRecordsByDataType
3) RecordManager._sortGroupByVersionTrackers and RecordManager.GetSortGroupByVersionStatus() : In our application we don't have an GroupByFields.
Hello Vaibhav,After checking within the XamDataGrid’s source code for version 16.2 I could confirm that there is no implementation of FieldLayoutCollection.GetPropertyDescriptiorProvider() method. Which version of the Infragistics controls you are using?Do you customize the FieldLayoutCollection class in your production application?
Unfortunately we are not able to repro in the sample application. We are still trying to get a repro in a test app for you to investigate. However we noticed a different in our profiling b/w our production application vs test application. In our problem application FieldLayoutCollection.GetPropertyDescriptiorProvider() takes most of the time. However our test application is not showing the same stack.
Can you provide some documentation as to when this call is made and what is its purpose ?