Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
860
Using ObservableCollectionExtended<T> with XamDataChart
posted
Hello, Our primary scenario using the charts is a high-speed, high-data-amount need with multiple charts going at once (though usually, only one will be operating at speed). Data is received in blocks of 50 data points somewhere between 2-8 times a second. At the current time we've been using a custom extension of ObservableCollection that has an AddRange(IEnumerable) method that then sends the Reset. This sometimes causes slowdowns after a few thousand data points have been added to the chart. In digging through the documentation I found the ObservableCollectionExtended class in the Infragistics.Collections namespace. Is there any information on how this is implemented and how it stacks up with the charts? Is it better to use for adding a range of items (with suppressed Add notifications, then sending Reset once all items added) and will it achieve better performance in a high speed, high volume charting scenario? Any information you can provide on the ObservableRangeExtended and using AddRange/Reset performance in the charts would be appreciated. Thank you!
Parents
No Data
Reply
  • 3255
    posted

    Hello Collin,

     

    This technique might yield slightly better performance.  However, this type of optimization already exists in the DataChart.  The Dispatcher queue is used to limit the number of redraw operations that come when many datapoints are updated in a short time.  The DataChart goes through the dispatcher queue to re-render changed data, so rapidly updating the datasource won’t cause the chart to update excessively.  This happens regardless of the type of data source that is used. 

     

    However, throttling the PropertyChanged notifications to set interval like 50-100ms can improve the perceived performance of the chart. There is no throttling in ObservableCollectionExtended<T>.

     

    ObservableCollectionExtended<T> is a derived ObservableCollection<T> that adds some extra functionality – e.g.

    ·         (Begin|End)Update – These are helper methods that will suppress change notifications while the collection is changed between calls to BeginUpdate/EndUpdate.

    ·         (Add|Insert)Range – Adds/inserts multiple items and then results in a Reset notification.

     

    We don’t  currently have any statistics specific to the performance of ObservableCollectionExtended when used as a data source for the XamDataChart.

Children
No Data