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

0
0

Is there an efficient way to append a subset of an array to a DataSeries? Manually looping with Append is slow (as expected). Iterating over an IEnumerable introduces overhead. I’ve read in the performance tips and tricks section that “Arrays have the biggest impact as these can be indexed using unsafe code”. The help documentation doesn’t list an Append overload specifically for an array so I assume the type is checked within the method.

I am reusing arrays whenever possible; however, my arriving data is not always the same length. In order to reduce allocations and garbage collection, I make use of Memory, Span, and ArraySegment elsewhere in my project. This allows me to pool and reuse memory. I have not found any DataSeries.Append overloads that would accept any of these types or otherwise allow me to specify the usable range of the array. Please let me know if I’ve overlooked something.

Thank you.

Version
6.2.1.13304
  • You must to post comments
0
0

Hi Scott

Your license is showing as expired, if you have recently renewed, make sure you re-activate to ensure the forum & support desk show you as licensed.

Anyway as it happens, we have a customer of ours that needs this same requirement – ability to wrap a DataSeries around a MemorySpan for visualising huge (multi Gigabyte) files. We’re going to do some research on our side for them, and if we find a solution, will publish it to the rest of our customers.

I can’t give an ETA, but would expect feasibility to take at least 2-3 weeks.

Other than that, your best bet is to use the DataSeries constructor overload which accepts arrays. Unfortunately there is no MemorySpan or pointer dataseries available yet.

Best regards,
Andrew

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.