Pre loader

Point marker performance bad(About 1,000 points)

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

Hi :

When I used BasePointMarker to draw what I need, I found that if I use a mount of points , program’s performance will be bad when I pan or zoom in/out the view.
Is it usual? I follow the example ,Custom point marker.

Fig 1 : With Point Marker
Fig 2 : No Point Marker

Best regards,
Xuan

Images
  • You must to post comments
0
0

Hi Andrew:

Thanks for your answer!

I have tried the method that you said. There is a problem. In my code ,context.DrawText() method cause exception popup “The calling thread must be STA, because many UI components require this”.
Using context.DrawEllipse() is correct,but context.DrawText() is not . Is there difference between DrawText and DrawEllipse?

public override void Draw(IRenderContext2D context, IEnumerable<Point> centers)
    {
        var fill = context.CreateBrush(Fill);
        var stroke = context.CreatePen(Stroke, AntiAliasing, (float)StrokeThickness);
        Action<Point> drawOp = (center) =>
        {
            var drawrect = new Rect(center, new Size(35, 40));
            //context.DrawEllipse(stroke, fill, center, _width, _height);
            context.DrawText(drawrect, fill.Color, 1, "0");
        };
        Parallel.ForEach(centers, drawOp);
    }

Here is my code.

Best regards,
Xuan

  • Andrew Burnett-Thompson
    DrawText is not supported in a multi-threaded environment. Only draw lines and only HighSpeedRenderSurface. What I did by showing you this article was that it is possible to draw 1,000,000 points scatter and I suggested you profile your code to find the bottleneck.
  • You must to post comments
0
0

No it’s not usual. We have an example here using Custom PointMarkers with 1,000,000 points

Please see our related FAQ Faster Performance Scatter Charting as well as Insane WPF Scatter Chart performance with Parallel Rendering.

Have you profiled your code to find out where is the bottleneck?

  • You must to post comments
0
0

Hi Andrew :

I found that my program in the Scichart v3.6 performance is good. In SciChart V4.0.3 performance is going down. After that,I try the sample that you provided.At the same code in V4.0.3,I found that Fps is 1~3. In V3.6 Fps can keep at 10 to 12. Low FPS cause my app performance worse. I hope some method to solve this problem.

Best regards,
Xuan

Images
  • You must to post comments
Showing 3 results
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