Pre loader

Tag: Span

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

0 votes
10k views

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.

Showing 1 result

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies