BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
Hi SyncFusion support,
I am facing a performance issue with my syncfusion cartesian chart, let me explain.
I have to show a lot amount of data point coming in live from a BLE device.
I update the data source every 100ms, with 2 new data values, splitted in 8 series and the biggest window is
5min.
Wich means, I need to show approximatively 48 000 data points in one chart (and one view), splitted in 8 series.
I use the FastLineSeries as mentionned in other performance issue threads.
I also use the 'updateDataSource' method on my controllers (every 100ms). The update of data has good performances.
But, after 25/30s, the performance slowy decrease until 300seconds (reach nearly 500ms/frame).
The 30seconds windows works nearly perfectly (maybe beacause it is only 4 800 data points ?).
So it mean that when I get more and more datapoint to show, the performance (Raster thread) slowly decrease until the moment I get no more datapoints to show in the same view (when I reach the 48 000 data points) and the performance stay at a very low level.
Animations are turned off and the stroke width is 0.2.
The CPU samples that takes the most time to execute are "RenderCustomPaint._paintWithPainter", "FastLineChartPainter.paint" and "calculatePoint".
The chart widget is not rebuilding it self, so the problem comes from the fastlineseries painter unfortunately.
Should I split the series in 8 smaller charts ? Or it makes no impact (or getting worse) ?
I can't share the app folder, but I can give you more details if you need.
Thanks.
I am responding to myself but I had a thought about it.
The resolution is like 3840pixels on the x-axis.
Wich means a straight line on the chart could be only 3840 data points.
I will try to compute my data source into a subsampling or something like that, to show only the amount of points needed for one pixel, or the more revelant datapoint. It might decrease the number of data points to show and increase the Raster thread performance.
Hi Rubens,
The following are the key points that can be used to boost the performance of the chart when there is a need to plot high-volume data.
Since we are not aware of the exact scenario of your application, we request you to update the following details.
Based on your application code, we will try to provide a solution at the sample level itself. If possible, please share your chart code to provide a better solution earlier.
Regards,
Yuvaraj.
Hi Yuvaraj,
Thanks for your answer ! But I think I've found something that works pretty fine.
To reply about your questions:
I use the updateDataSource method, I have disabled the data label and I don't need user interactions.
What I've take in place is the following strategy:
I've add a factor value for my different windows and I use it to create a subsample of my data source.
Then I refresh the UI with a setState (chart widget only).
For exemple:
On the biggest windows wich is 300 seconds, I compute a subsample every second with a min/max algorithm on a one second range. I set a different stroke width regarding the window size.
So the amount of data points goes from 6000 on a 300seconds window to only 600 without losing information about the signal.
The raster thread and UI thread performance is now pretty good and works >60 fps average.
Best regards,
Rubens.
Hi Rubens,
Most welcome, we hope your application performance was improved. Please get back to us if you need any further assistance on this.
Regards,
Yuvaraj.