Delay when switching active view from ViewXY to View3D

A forum dedicated to WPF version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
ShawnCG
Posts: 57
Joined: Tue Oct 15, 2013 8:31 pm

Delay when switching active view from ViewXY to View3D

Post by ShawnCG » Wed Nov 13, 2013 11:32 pm

Dear Arction Support,

I'm running into an issue where there is a 1-2 second delay when switching between ViewXY and View3D for the active view (or vice versa) in a single LightningChartUltimate object. The delay only happens the first time I switch from one to the other -- after that, switching back and forth happens much faster, like less than 100 milliseconds. When I put timers around various parts of the code, I can see that the time lag occurs inside the call to EndUpdate(). Is there any way to minimize the time delay when switching the active view that first time?

Thanks for any help you can offer!

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

Re: Delay when switching active view from ViewXY to View3D

Post by ArctionPasi » Thu Nov 14, 2013 9:43 am

Hi ShawnBG,

I just tested this with LC Demo App's examples. In a 2D example, I just set ActiveView= View3D in property grid. The delay is something like 10 ms. The View3D has of course only the walls and axes, with no series at all.

What kind of stuff do you have in View3D? Many series in ViewXY and View3D? Ensure you are running your app without debugger to measure real delay.
LightningChart Support Team, PT

ShawnCG
Posts: 57
Joined: Tue Oct 15, 2013 8:31 pm

Re: Delay when switching active view from ViewXY to View3D

Post by ShawnCG » Thu Nov 14, 2013 7:27 pm

I've uploaded an example project. After building the example, click on the button "Toggle XY/3D" and take a look at the timing reported in the text box on the left. You can edit the constructor MainWindow() in MainWindow.xaml.cs to change _isView3D from false to true initially to see the effect of initially starting with a 3D view.

Can you see the timing issue I am wondering about?
Attachments
LCexampleXYto3D.zip
Example Visual Studio project
(10.93 KiB) Downloaded 721 times

ShawnCG
Posts: 57
Joined: Tue Oct 15, 2013 8:31 pm

Re: Delay when switching active view from ViewXY to View3D

Post by ShawnCG » Thu Nov 14, 2013 7:43 pm

Here is a screenshot of the results I get after clicking Toggle XY/3D several times.
Attachments
Example starting with XY and switching to 3D
Example starting with XY and switching to 3D
XYto3Dexample.jpg (137.82 KiB) Viewed 15558 times

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

Re: Delay when switching active view from ViewXY to View3D

Post by ArctionPasi » Thu Nov 14, 2013 8:44 pm

I'm assuming the coloring/contour HLSL effect compiling in GPU takes majority of this time. I'll profile the application tomorrow and get back to you. The compiling is made when a coloring is used first time. Both IntensityGrid in ViewXY and SurfaceGrid in View3D use their own coloring effects.
LightningChart Support Team, PT

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

Re: Delay when switching active view from ViewXY to View3D

Post by ArctionPasi » Fri Nov 15, 2013 3:00 pm

Yes, it's the HLSL effect compiling that takes the time when the series is rendered the first time.
Profiler dump
Profiler dump
profiler_pic.png (57.02 KiB) Viewed 15549 times
By using a coloring with fewer steps and no contour zones will give faster compiling. :geek:
LightningChart Support Team, PT

ShawnCG
Posts: 57
Joined: Tue Oct 15, 2013 8:31 pm

Re: Delay when switching active view from ViewXY to View3D

Post by ShawnCG » Fri Nov 15, 2013 4:53 pm

Thanks for looking into it!

Post Reply