We are experiancing very poor performance of child rows in our application, it just freezes until I kill the process. We have real time data updates on the grid (and this data is throttled to increase performance). If there are 2000 rows (Real time data updating) without any child records, It works ok.
But If I enable (even if single) child record, app freezes after few seconds. I did profiling and only difference I could find with Child record and without child record was call to System.Data.DataRelationPropertyDescriptor.GetValue. This calls eats up lots of CPU time.
See the Call Tree, taken from DotTrace profiler.
5.82 % System.Data.DataRow.EndEdit... - 1503602* ms - 200175 calls 5.25 % OnListChanged - 1357184* ms - 278186 calls - Infragistics.Windows.Helpers.BindingListChangedEventManager.OnListChanged(Object, ListChangedEventArgs) 5.25 % System.Windows.WeakEventManager.DeliverEvent... - 1357128* ms - 278186 calls 5.25 % ReceiveWeakEvent - 1356129* ms - 278186 calls - Infragistics.Windows.DataPresenter.RecordManager.ReceiveWeakEvent(Type, Object, EventArgs) (from System.Windows.IWeakEventListener) 5.25 % OnChangeNotification - 1356058* ms - 278186 calls - Infragistics.Windows.DataPresenter.RecordManager.OnChangeNotification(Object, Object, Boolean) 5.25 % ProcessChangeNotification - 1355660* ms - 278186 calls - Infragistics.Windows.DataPresenter.RecordManager.ProcessChangeNotification(Object, Object) 5.25 % OnBindingListChanged - 1355607* ms - 278186 calls - Infragistics.Windows.DataPresenter.RecordManager.OnBindingListChanged(Object, ListChangedEventArgs) 5.17 % RefreshCellValues - 1336220* ms - 135180 calls - Infragistics.Windows.DataPresenter.DataRecord.RefreshCellValues(Boolean, Boolean, Boolean) 4.38 % GetCellValue - 1130658* ms - 111441 calls - Infragistics.Windows.DataPresenter.DataRecord.GetCellValue(Field, Boolean) 4.38 % GetCellValueHelper - 1130583* ms - 111441 calls - Infragistics.Windows.DataPresenter.DataRecord.GetCellValueHelper(Field) 4.38 % System.Data.DataRelationPropertyDescriptor.GetValue... - 1130346* ms - 111441 calls 0.70 % SetDataSource - 180768 ms - 111440 calls - Infragistics.Windows.DataPresenter.RecordManager.SetDataSource(IEnumerable, Boolean) 0.07 % RaiseInitializeRecord - 17729 ms - 135179 calls - Infragistics.Windows.DataPresenter.DataPresenterBase.RaiseInitializeRecord(Record, Boolean) 0.01 % SyncValueWithCellValue - 2638 ms - 58485 calls - Infragistics.Windows.DataPresenter.CellValuePresenter.SyncValueWithCellValue(DataRecord, Field) 0.07 % RefreshCellValue - 18685 ms - 143006 calls - Infragistics.Windows.DataPresenter.DataRecord.RefreshCellValue(String, Boolean)
I have tried all version (10.2,10.1,9.1 with latest service packs) None of them is able to handle Real time data updates even if there is single Child record.
We already have Virtualization enabled in the grid.
_grid.RecordContainerGenerationMode = Infragistics.Windows.Controls.ItemContainerGenerationMode.Recycle;//ItemContainerGenerationMode.Virtualize _grid.CellContainerGenerationMode = CellContainerGenerationMode.Recycle;//CellContainerGenerationMode.Virtualize _grid.RecordLoadMode = RecordLoadMode.LoadOnDemand;
Can some one please help?
Thanks,
Naveen
Naveen,
I have sent notification to you (through the private support case you opened with us) that this issue was fixed in the latest WinClient/WPF Service Release that went out last week.
Francis
I am adding my comments from the case that I responded to you earlier as a suggested answer here.
I think the Thread.Sleep() is the problem. It does not guarantee the accurate duration of sleep time. It may freeze the service that is requested to stop or even kill the thread.
I have replaced the TreadSleep() with Timer, and it works as expected. I am attching the modified version of your sample. Please test it and let me know your thoughts on this approach. Take a look at the sections marked as:
"CHANGES Start *************""CHANGES End *************"
Sam
Thank you for the sample.
It seems like the performance issue is caused by adding a record in the background thread, which is not supported. XamGrid only supports changing cell value for an existing record in another thread.Let me know if you have anu question.
Hi Sam,
I have created a support case CAS-49388-NZPMWQ for this, also attached a sample app that reproduces the issue, can you please look at that?
thanks,
Haveen,
I set up a sample project to test this scenario. For me to have a real time data, I used random number generator. I use a collection with 3 columns, some parent records, and one of the record contains 2000 child records. Every 2 second it re-generates random numbers and rebinds to the grid.
With this setup, I don't see any issues.
Can you take that attached sample and try to modify and reproduce the issue you have with your application?
Thank you,