Pre loader

DataSeries.Append support for Span, Memory, or ArraySegment

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums


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.

  • You must to post comments

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,

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.