Pre loader

High memory usage when setting strokeDashArray

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
0

I’m creating a web application in which I have a little bit over a million data points. When toggling annotations (about 4000) on one of my charts I noticed the memory usage of Chrome was doubled. I did some tinkering and found out this behaviour only occurred when I had “strokeDashArray” set in my VerticalLineAnnotations.

  for (let i = 0; i < 5000; i++) {
    const line = new VerticalLineAnnotation({
      x1: i,
      strokeDashArray: [5, 5] //If this is removed then the memory usage drops
    });

    sciChartSurface.annotations.add(line);
  }

Is there a known memory problem with dashed lines or anything I might do wrong?

Version
3.3.560
  • You must to post comments
0
0

Hello. Currently, some amount of memory increase is expected in this case.
There are potential optimizations we can apply in the future. Or maybe some alternative solution using Renderable Series could be applied.

First of all we need to understand a bigger pciture of what you are trying to implement. Like: the reason why youn need 5000 annotations?; If all of those vertical lines should have the same style?; etc.
You can contact us via the Support Desk for assistance and deeper requirements analysis.

  • You must to post comments
0
0

I’m using SciChart to display ECG data. In the use case I experienced the memory problem I created a chart from a ~40 minutes ECG. Each vertical line annotation is used to indicate a beat. All lines look identical and the only thing differentiating them are the x1-values.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.