View3D Chart.RenderOptions.None

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
mat-d
Posts: 19
Joined: Sat Jun 26, 2021 4:27 am

View3D Chart.RenderOptions.None

Post by mat-d » Fri Nov 25, 2022 11:07 am

In my application, when charts are not displayed I set the render device to none, following advice from the manual.

Bu this has cause problems in the 3d chart.

Chart.RenderOptions.DeviceType = value ? RendererDeviceType.Auto : RendererDeviceType.None;

Although there are no problems opening a new chart and loading 50,000 points into it,

If I load the points while RendererDeviceType.None, then switch to RendererDeviceType.Auto, on tablets without a dedicated gpu i'm getting a hang of about 15 seconds.

And on my laptop (which has a gpu), jetbrains rider analysis claimed that around 250 Mb of PointFloat3DWithIndex[] were being allocated when I switched the chart on and off. Unfortunately I didn't notice at the time it was happening.

I've just started leaving the Chart.RenderOptions.DeviceType = RendererDeviceType.Auto all the time and am not having any issues.

Is there a detail to changing Chart.RenderOptions.DeviceType that I'm not aware of or some other issue?


Thanks

Mat

ArctionKestutis
Posts: 552
Joined: Mon Mar 14, 2016 9:22 am

Re: View3D Chart.RenderOptions.None

Post by ArctionKestutis » Fri Nov 25, 2022 1:42 pm

That is interesting observation, that tablets device needs 15 sec to switch DeviceType (Chart.RenderOptions.DeviceType).
I don't see the reason why it would be the case, because creating RenderingEngine is part of chart initialization (you just delaying it with RendererDeviceType.None.)
I tried to replicate issue on my desktop PC with PointCould3D example with no luck.

However, probably most important question is about usage of RendererDeviceType.None. As User Manual mentions, this maybe useful in case chart is hidden for long period of time. For example other object are drawn on top of it, or it is on non-active Tab of TabControl. If Chart is suppose to be visible all the time, there is no point in disposing and recreating RenderingEngine.

Hope this helps.

P.S. if you want to get to the root of tablets device delay, you could try subscribing to Chart.ChartMessage event. Maybe you will get some message explain the issue. For example, out-of-memory, or falling to create RenderingEngine.

mat-d
Posts: 19
Joined: Sat Jun 26, 2021 4:27 am

Re: View3D Chart.RenderOptions.None

Post by mat-d » Sat Nov 26, 2022 12:14 am

Thanks Kestutis,

In the app the 3d view is loaded in the background and only displayed occasionally.
Most of the time it is not visible, instead the 3 x 2d views of the same data are shown.

I'll make a sample application with the minimum set up to reproduce the issue and I'll share it.

Thanks for responding so quickly,

cheers

Mat

mat-d
Posts: 19
Joined: Sat Jun 26, 2021 4:27 am

Re: View3D Chart.RenderOptions.None

Post by mat-d » Fri Apr 14, 2023 10:44 am

Ok, turns out that there is a hardware / driver issue with multiple surface tablets, and that is causing the problem, I think we might have it resolved now

mat-d
Posts: 19
Joined: Sat Jun 26, 2021 4:27 am

Re: View3D Chart.RenderOptions.None

Post by mat-d » Wed Apr 26, 2023 10:41 am

Hello Kestutis,

Thank you for your help on this issue.
It seems the problems are not yet resolved.

I have situations where the 3d chart is blank and it seems to take a very long time to render.
I'm going to use chart message to see if there is any signal when the chart is ready.
Do you have any sugestions?

Thanks

Mat

ArctionKestutis
Posts: 552
Joined: Mon Mar 14, 2016 9:22 am

Re: View3D Chart.RenderOptions.None

Post by ArctionKestutis » Wed Apr 26, 2023 1:43 pm

We would need a little bit more description of symptoms/issue:
* how many points, triangles or quadrangles you have one the chart?
* how chart update is done (how much need data is coming during update)?
* is chart blank initially or after some processes?

I could imagine if you trying to create MeshModel or Surface-3D form 100s million triangles, it could be significant delay.
If amount of point/data is not that big, then you should check is actually data generation/reading is part of UI Tread work. Making UI Tread more responsive and reducing time of calculation could be done with multi-thread application. However, it is very critical to use multitreading in the right way. The discussion of that approach could be found in our blog.
If you are testing with Visual Studio debugger attached, you can click on 'pause' button. That will set the break-point in the code, where application currently is running. This may help to identify what application is doing at this long delays.
There are other ways to profile performance.

The discussion would be less academic and hypothetical if you could share application, where this problem could be reproduced. You can create test application from our examples. And you can email the application directly to LightingChart Support, if you don't want to share publicly.

mat-d
Posts: 19
Joined: Sat Jun 26, 2021 4:27 am

Re: View3D Chart.RenderOptions.None

Post by mat-d » Tue May 02, 2023 6:01 am

thanks Kestutis,

I'm wokring on another project this week and will get back to you next week

thank you for your time.

Regards Mat

mat-d
Posts: 19
Joined: Sat Jun 26, 2021 4:27 am

Re: View3D Chart.RenderOptions.None

Post by mat-d » Fri May 05, 2023 11:18 am

How odd,

I've posted a couple of replies to you here but none are appearing,
I might have solved the problem. If it passes the test I'll come back and explain.

Post Reply