Summary
I have a large an rapidly changing dataset which I wish to bind to a UI (Datagrid with grouping). The changes are on two levels;
- Items are frequently added or removed from the collection (500 a second each way)
- Each item has a 4 properties which will change up to 5 times in its lifetime
The characteristics of the data are as follows;
- There are ~5000 items in the collection
- An item may, within a second, be added then have 5 property changes and then be removed.
- An item may also remain in some interim state for a while and should be displayed to the user.
The key requirement which I'm having problems with;
- The user should be able to sort the dataset by any property on the object
What I would like to do;
- Update the UI only every N seconds
- Raise only the relevant NotifyPropertyChangedEvents
If item 1 has a property State which moves from A -> B -> C -> D in the interval I need/want only one 'State' change event to be raised, A->D.
I appreciate a user doesn't need to have the UI updated thousands of times a second. if an item is added, has its state changed and is removed all within the window of N seconds between UI updates it should never hit the DataGrid.
DataGrid
The DataGrid is the component which I am using to display the data. I am currently using the XCeed DataGrid as it provides dynamic grouping trivially. I am not emotionally invested in it, the stock DataGrid would be fine if I could provide some dynamic grouping options (Which includes the properties which change frequently).
The bottleneck in my system is currently in the time taken to re-sort when an item's properties change
This takes 98% of CPU in the YourKit Profiler.
A