SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, iOS Chart, Android Chart and JavaScript Chart Components

0
0

Is the styleFor function of SCIPaletteProvider that was in Version 2.0 not implemented in Version 4.8?
Also, are there any plans to implement it?

I am upgrading from SciCharts 2.0.1 to SciCharts 4.3.
When the color was set using SCI Palatt Provider in Version 2.0, the memory used was 200M, but in Version 4.3, the memory used may consume as much as 1G.
I tried to devise it by setting the Sampleing Mode, but it is not very effective.

SCI Charts is used to display the spectrum data of audio data while playing the sound.

Version
4.3
Images
  • You must to post comments
0
0

Hi Keiki

PaletteProvider is stil implemented in v4.4 of SciChart iOS/Android. See the Audio Analyzer example here.

iOS & macOS Audio, Radio frequency and Spectrum Analyzer

The PaletteProvider was optimised at some point to return an array of colours. This improves drawing performance significantly. Ensure that you re-use memory and delete memory when finished.

See PaletteProvider documentation
https://www.scichart.com/documentation/ios/current/paletteprovider-api.html

Also see SCIUnsignedIntegerValues reference for more info. This implements SCIDisposableBase so its likely you have to dispose the memory when finished with it.
https://www.scichart.com/documentation/ios/current/Classes/SCIUnsignedIntegerValues.html

Let us know if this helps. If not, please provide code that causes the high memory issue and our team can investigate.

Best regards,
Andrew

  • You must to post comments
0
0

Thank you for your reply. The code in SciChart.Example was also very helpful.

When I run the AudioAnalyzer in SciChart.Example, I can see that the memory is moving between 230M and 250M.
Next, change the RenderableSeries of FFTChart of AudioAnalyzer to SCIFastLineRenderableSeries.
I changed the renderableSeriesType of FFTPaletteProvider to SCIFastColumnRenderableSeries and made it work.
It changed between 280M and 420M, and it was confirmed that the memory usage increased.
Next, when I increased the BufferSize of the FFT to 4096 and 8192 and tried to operate it, the memory usage increased.
Is this a specification of SCI FastLineRenderableSeries?

In my program
SCIPalatteProvider sets 250 color settings from y value for 2750 points of data. (With one update function)
If SCIPalatteProvider is not set, the graph will continue to be drawn at 50FPS to 100FPS and the memory will be around 300M to 370M.
With SCIPalatteProvider, FPS goes down and memory usage goes up to 1G as shown in the attached image.
This is an event that was not seen in Version 2.0.
In Version 2.0, the color is set by the styleFor function, and the memory usage does not increase like version 4.3.
I hope version4.3 also implements the styleFor function.
Is there any other way to reduce memory usage?

Images
  • Yura Khariton
    Hi there. It’s expected that using different series types especially if you use PaletteProvider can have different memory footprint. Also if you’re using FIFO series, then we allocate all required memory to work with size that you specified – that’s why you see increase in memory when you increase FIFO buffer size. As for difference between v2 and v4 – as I know PaletteProvider API was refactored to provide more FPS and use less CPU by caching results of PaletteProvider calculations between redraws, but to do this we needed additional memory. If you think that there is a memory leak somewhere in library, then please provide project that reproduces this and one of our team members will investigate it.
  • You must to post comments
0
0

Thank you for your reply.
By changing the source of AudioAnalyzer of SciChart.Example,
(* Specifically, change RenderableSeries to SCI FastLineRenderableSeries, change FFTSize, etc.)
I was able to see the difference between v2 and v4.

Using SCIFastLineRenderableSeries and SCI PalatteProvider will increase memory usage,
The app never crashes.
However, I don’t want to increase by 1G, so I decided to draw in a single color without using SCI Palatte Provider.

I wish v4 also had a styleFor function.
I hope you can consider it.

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.