Many charts performance

A forum dedicated to WPF version of LightningChart Ultimate.

Moderator: Arction_LasseP

matus
Posts: 24
Joined: Mon Sep 12, 2016 7:52 am

Many charts performance

Post by matus » Tue Oct 25, 2016 2:01 pm

Hello,
we are experiencing very bad performance when we display more charts (20 in this example).
When resizing the container with the charts (collapsing part of the screen) freezes the UI for several seconds (up to 10 seconds).
Each chart has 2 point line series with cca 3000 points. One of the series has visible circular points and the other is clickable and has circular points with transparent color.

I found out, that the transparent points are causing the problem, because clickable.PointStyle.BorderWidth = 50. Reducing the width improves the performance (but it still takes 2-4 seconds).
The width is so big, because we are using the invisible points to detect user interaction with touch (we need quite big area to have good user experience).
Is there another way to detect clicks in an area around the point from the series?

Is there a way to improve performance with this amount of charts in general?

User avatar
ArctionPasi
Posts: 1365
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland

Re: Many charts performance

Post by ArctionPasi » Tue Oct 25, 2016 2:26 pm

Hi Matus,

The size of the point here is the major problem. That size of round point is composed of hundreds of small triangles. Please use Rectangle shape.

Also ensure you are running with 7.2 version, with DirectX11 engine. You can check that by using chart.GetRenderDeviceInfo().

Best regards,
Pasi
LightningChart Support Team, PT

matus
Posts: 24
Joined: Mon Sep 12, 2016 7:52 am

Re: Many charts performance

Post by matus » Tue Oct 25, 2016 2:47 pm

I don't remember why we used the border, but I tried to set the actual width and height of the point and the performance is much better (4-5 seconds). The shape doesn't make any difference.

Nevertheless the performance is poor also with this improvement.

Is that a limitation that we cannot pass? Is having 20 charts on the screen a supported use case?

User avatar
ArctionPasi
Posts: 1365
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland

Re: Many charts performance

Post by ArctionPasi » Tue Oct 25, 2016 3:04 pm

Can you please send screenshot of your app, so I could instruct you better? Also if you can post a small VS project here to reproduce the issue, that would be nice.

Having a few multi-segment charts instead of dozens single-segment chart saves a lot of performance and memory resources.

What is your GPU type,btw? If you use GPU-Z tool, can you check what kind of GPU load does it show?
LightningChart Support Team, PT

matus
Posts: 24
Joined: Mon Sep 12, 2016 7:52 am

Re: Many charts performance

Post by matus » Tue Oct 25, 2016 3:15 pm

We use Dx11 rendering, here's the rendering info:
renderInfo
renderInfo
renderInfo.PNG (19.45 KiB) Viewed 18228 times
I checked the GPU-Z, I'm not sure what info is relevant there, but here's a screenshot:
gpu-z
gpu-z
gpu-z.PNG (51.43 KiB) Viewed 18228 times
the Load peaks at 52% during the UI freeze

here's the screenshot of the app, you can see the collapser on the left, the charts are in a scrollviewer (see the scrollbar on the right side)
app-screen
app-screen
app-screen.PNG (239.63 KiB) Viewed 18228 times

User avatar
ArctionPasi
Posts: 1365
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland

Re: Many charts performance

Post by ArctionPasi » Tue Oct 25, 2016 3:22 pm

That GetRenderDeviceInfo doesn't reveal anything. Please call it after chart has rendered at least once, e.g. in double-click event handler.
LightningChart Support Team, PT

User avatar
ArctionPasi
Posts: 1365
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland

Re: Many charts performance

Post by ArctionPasi » Tue Oct 25, 2016 3:27 pm

Are all the charts in scrollable container? If so... the overall renderable area is quite huge.

For this kind of purpose, we would recommend using multi-segment chart instead.
LightningChart Support Team, PT

matus
Posts: 24
Joined: Mon Sep 12, 2016 7:52 am

Re: Many charts performance

Post by matus » Tue Oct 25, 2016 3:32 pm

updated render info:
render info
render info
renderInfo.PNG (20.67 KiB) Viewed 18226 times

matus
Posts: 24
Joined: Mon Sep 12, 2016 7:52 am

Re: Many charts performance

Post by matus » Tue Oct 25, 2016 3:35 pm

what is a multi-segment chart? is it some special chart type that I can see in your demo application? or just a single chart with multiple series?

User avatar
ArctionPasi
Posts: 1365
Joined: Tue Mar 26, 2013 10:57 pm
Location: Finland

Re: Many charts performance

Post by ArctionPasi » Tue Oct 25, 2016 4:59 pm

Multi-segment chart has several Segments specified in ViewXY.AxisLayout.Segments. Setting AxisLayout.YAxisLayout=Segmented applies it.

There's e.g. this example in the demo applications:
Multi-segment chart
Multi-segment chart
multi-segment-chart.jpg (526.32 KiB) Viewed 18224 times
LightningChart Support Team, PT