Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
3220
DataChart scroll/zoom performance
posted

Hello,

the attached sample project performes very slow during resize/scrolling/zooming, when the chart has a line series with just 10.000 entries and the window is full screen. In full screen mode the chart is almost not usable.

Are there any settigs to make it faster and more responsive?

Attached is the sample project.

XamDataChartPerformance.zip
  • 80
    Suggested Answer
    Offline posted

    Markus,

    I had this exact same issue.  IG was able to supply some test code for a in-development chart series called the ImmediateLineSeries which uses the open-source writable bitmap to replace the WPF direct2D drawing engine (if I understand correctly).  It is about 10x the performance on these complex data plots.  The writable Bitmap is available from Nuget or codeplex  http://writeablebitmapex.codeplex.com/  You will have to ask if IG has this development code available.

    I am told this *may* have been added as a new chart type in the 16.2 release, but I have not verified this.

    Gary

  • 34810
    Verified Answer
    Offline posted

    Hello Bin Cui,

    After loading your sample project, I am seeing a chart with a highly fluctuating, purely random set of XamDataChart points. Unfortunately, this scenario is an edge case in which most of the performance issues that you are seeing are not coming from the XamDataChart, but from WPF.

    If you were to profile your application using a sort of diagnostic tool, I would imagine that you would see that most of the performance time spent here is in WPF's hardware rasterizer. WPF uses hardware acceleration as its default rendering mechanism, which means it uses Direct2D for rendering via the GPU. This normally makes performance faster, but there is an issue with Direct2D with this type of highly fluctuating shape, in which the rendering algorithm does not work well. This leads to Direct2D needing to do some conversions with the WPF path data, which makes the rendering operations happen primarily on the CPU rather than the GPU, and so there is a performance issue with this type of fluctuating path geometry. Unfortunately, there really isn't too much we can do to avoid this.

    One question I'd very much like to know is if your real-world data will look like this, or whether it will be a bit more linear with less fluctuation? I ask this, as with a more linear shape, you will see a better quality of performance, as this WPF Direct2D issue will no longer exist. For example, I would like you to take a look at the modified version of the sample project that I have attached. In this modified version of the sample you sent, the algorithm used to generate points is more linear, but is still very much random, and instead of 10,000 points, there are now 1 million points and the performance is very responsive.

    Please let me know if you have any other questions or concerns on this matter.

    Sincerely,
    Andrew
    Associate Developer

    XamDataChartPerformance.zip