Pre loader

Using Multiple REAL Time Charts in a WPF application

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

Hello I am curenntly using three REAL Time Charts (FiFo) in my WPF application and I am running into performance issues, which result in UI stuttering. I tried to optimize my performance using your very informative article on performance (Rendering,Stroke,Buffer etc.), but it did not help much, so I wondered if you might be able to help me.

I currently use three graphs and each of them has two different sets of data applied. The size of my FiFo graphs is 100 samples, with a dt= 0.01 (100Hz). I assume the OnNewData event is triggered at that rate as well?

My current code looks like this:

private void OnNewData(object sender, EventArgs e)
    {

        if (TaskManager.tempObject. != null)
        {
            lock (TaskManager.tempObject)
            {
                y0 = Math.Abs(TaskManager.tempObject.LaserPosRel - TaskManager.tempObject.AxisPos);
                y1 = TaskManager.tempObject.AxisPos;
                y2 = TaskManager.tempObject.AxisSpeed;
                y3 = TaskManager.tempObject.AxisAcc;
                y4 = y1;
                y5 = TaskManager.tempObject.LaserPosRel;

            }
        }


        using (sciChartSurface1.SuspendUpdates())
        {
            _series0.Append(t, y0);


        }

        using (sciChartSurface2.SuspendUpdates())
        {

            _series1.Append(t, y1);
            _series2.Append(t, y2);
            _series3.Append(t, y3);


        }

        using (sciChartSurface3.SuspendUpdates())
        {

            _series4.Append(t, y4);
            _series5.Append(t, y5);

        }

        // Increment current time
        t += dt;
    }

I wondered if you have any proposals how to enhance my code, regarding performance?
Would it make a difference if I would Append the series in a new thread? I was not sure of this, since it is stated
in the FAQ that SciChart already uses it’s own threads for rendering.

Any help is appreciated, thanks in advance!

best regards

nils

  • You must to post comments
1
0

Hi Nils,

To avoid stuttering, can you check the following?

Most importantly, check your Power Management settings in Control Panel. Are they set to High Performance? Balanced or power saver modes have CPU throttling which can make SciChart graphs appear to stutter.

In our Examples App we have a widget to change the power-management options. Check out the difference in performance between high and low power modes!!

enter image description here

Best regards,
Andrew

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

Try SciChart Today

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

Start TrialCase Studies