WPF bindable - performance loss?

A forum dedicated to WPF version of LightningChart Ultimate.

Moderator: Arction_LasseP

Post Reply
speciesxx
Posts: 3
Joined: Thu Nov 02, 2017 2:08 pm

WPF bindable - performance loss?

Post by speciesxx » Thu Nov 09, 2017 1:12 pm

Hi all,

we're evaluating the LCU suite for real time data monitoring. In the manual there are 3 kind of chart editions specified, with each their own performance:
- WPF non-bindable (Excellent)
- WPF semi-bindable (Very good)
- WPF bindable (Good)

Since we use MVVM, we wonder how big the performance loss is between the 3 editions. And why there is any performance loss? Is there any way we can compensate for this, or work around the loss?

Will it make any difference if we create an own UserControl which will encapsulate the WPF non-bindable edition. And on that UC create an own bindable (dependency)property for the data (e.g. ObservableCollection<double>())
Once the property changes, catch the event and update the chart series data according. The updating of the data will look like this:

Code: Select all

chartView.SampleDataSeries.Add(series);
(probably your bindable chart control does exactly the same ?)

Note: our data will come from an external device, which will eventually update our viewmodel data points (which we want to show in the chart)

Thanks in advance.

User avatar
ArctionPasi
Posts: 1362
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland
Contact:

Re: WPF bindable - performance loss?

Post by ArctionPasi » Fri Nov 10, 2017 6:53 am

Hello,

Giving exact performance comparison between these editions is impossible as it depends on the use case so much.

Non-bindable is fastest because we can use parallel computation for practically everything, and the data point arrays can be accessed directly in linear memory space.

Binding needs observable collections and DependencyProperties and both have significant performance affect.

Fully bindable chart does not have any internal adapter between application's data and internal point handling. The chart is handling the application's observable collections when it's refreshing itself, or otherwise needs get access to data.

For your case, if max performance is required, I would recommend using non-bindable. If more convenient usage in MVVM is preferred, use semi-bindable. Semi-bindable supports binding other things, but just give data as an array of data points.
LightningChart Support Team, PT

Post Reply