performance with two screens

A forum dedicated to WinForms version of LightningChart Ultimate.

Moderator: Queue Moderators

Post Reply
fredd41
Posts: 113
Joined: Fri Sep 05, 2014 6:46 pm

performance with two screens

Post by fredd41 » Tue Apr 12, 2016 7:13 pm

hi

I have a chart with 2 signals and 2 bands. When my chart is smaller than 1 screen (1920x1080), I can move (with the position of my mouse) my bands very quickly. But If I maximize my chart on 2 screens (3840x2160), there is a big lag between the position of my mouse and the position of the bands. Both signals have 10 000 000 samples.

thanks
fred

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

Re: performance with two screens

Post by ArctionPasi » Wed Apr 13, 2016 5:21 am

Hi,

Which LC version are you using? And which graphics card type?

From your story I couldn't figure out if your system is 4K or not. Ensure you have a powerful GPU to utilize 4K resolution 3840x2160. With many graphics cards the refresh rate is only 30 Hz and normal Windows usage is also laggy. Having a lot of data points in the chart... more laggy for sure.

It helps with the performance a lot, if you set series.LineStyle.Width = 1.
LightningChart Support Team, PT

fredd41
Posts: 113
Joined: Fri Sep 05, 2014 6:46 pm

Re: performance with two screens

Post by fredd41 » Wed Apr 13, 2016 11:34 am

version 6.5.8.4

I made a mistake. If I maximize my chart on both screens, the resolution is 3840x1080 (not 3840x2160).

why the behavior is not the same depending on the size of my chart ?
when I move a band, do you redraw all the points of the chart or just the points under the band (the band is only 2 lines with no inside color) ?
why if the chart is smaller the redraw is very fast ?

my users need to use my software on 2 screens.

thx
Last edited by fredd41 on Wed Apr 13, 2016 11:43 am, edited 2 times in total.

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

Re: performance with two screens

Post by ArctionPasi » Wed Apr 13, 2016 2:23 pm

LC uses DirectX, which is immediate mode rendering technology. All the chart client area has to be refreshed when something changes. But we use cached GPU instructions, so we don't have to go through data points and reconstruct their GPU instructions when moving the band. Only band's GPU instruction are updated and then whole chart refreshed.

By using Winforms demo app's "Large Data Open Speed" Test example, and generating 4 x 10 M data points, and adding a band, it moves just fine with 60 FPS without any lags.
4 x 10 M points on two full-hd screens
4 x 10 M points on two full-hd screens
Two monitors width.jpg (1.42 MiB) Viewed 124973 times
Since you didn't tell your GPU type, this is just guessing, but it may be just up to the GPU type, eventually. I'm using NVidia GTX 750 in this test.
LightningChart Support Team, PT

fredd41
Posts: 113
Joined: Fri Sep 05, 2014 6:46 pm

Re: performance with two screens

Post by fredd41 » Thu Apr 21, 2016 1:51 pm

Hi

I tried your example "Large Data open speed test" with a simple band (with transparent interior). If you resize the band (by left or by right), the border doesn't follow the mouse position, there is a lag between the border position and the mouse position. I can send you a video if you want.

Same thing if you try the example "cut line data", the cursor doesn't follow the mouse position. There is always a lag (approx. 1 cm between the cursor and the mouse position). Redrawing a simple line must be very fast, it's a simple task. This is very disturbing for my users, they wonder why it's not faster.

You can try "bands" and resize the green band. You can see a lag between the border and the mouse.

Other example : "Cursor tracking".

I created a picturebox with the same size of the band, the picturebox follow the mouse position.

When I profile my code with your dll. If I move (5 or 6 pixels only) a simple transparent band or a cursor, the time is spent in these functions:

Arction.LightningChartUltimate.LightningChartUltimate.WndProc() 900ms 324 calls
Arction.LightningChartUltimate.LightningChartUltimate.OnMouseMove() 432 ms 93 calls
System.Windows.Forms.Control.OnMouseMove() 4 ms 93 calls
Arction.LightningChartUltimate.Views.ViewBase.CQB() 428 ms 91 calls
Arction.LightningChartUltimate.SeriesXY.Band.SetProperCursor() 22 ms 91 calls
Arction.LightningChartUltimate.Views.ViewXY.ViewXY.MouseMoved() 10 ms 91 calls
Arction.LightningChartUltimate.Views.ViewXY.ViewXY.ChildPropertyChanged() 391 ms 18 calls
Arction.LightningChartUltimate.LightningChartUltimate.ChildPropertyChanged() 391 ms 18 calls
Arction.LightningChartUltimate.LightningChartUltimate.JZB() 391 ms 18 calls
Arction.LightningChartUltimate.LightningChartUltimate.MZB() 391 ms 18 calls
Arction.LightningChartUltimate.LightningChartUltimate.ZEC() 222 ms 18 calls
A.KB.FI() 164 ms 18 calls
SharpDX.Direct3D9.Device.Present() 164 ms 18 calls
SharpDX.Direct3D9.Device.H() 164 ms 18 calls


thanks
Attachments
profiling.zip
(450 Bytes) Downloaded 501 times

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

Re: performance with two screens

Post by ArctionPasi » Thu Apr 21, 2016 2:10 pm

Hi Fred,

what is your GPU type? That is essential info.

Please update to 7.0.2 and let us know if the problem persists. At least run the demo app, and compare to v.6 performance.
LightningChart Support Team, PT

fredd41
Posts: 113
Joined: Fri Sep 05, 2014 6:46 pm

Re: performance with two screens

Post by fredd41 » Thu Apr 21, 2016 2:17 pm

each user has a different computer.

what is the difference between version 6.5 and 7.0 ? I don't want to rewrite all my code.

fredd41
Posts: 113
Joined: Fri Sep 05, 2014 6:46 pm

Re: performance with two screens

Post by fredd41 » Thu Apr 21, 2016 2:23 pm

my computer is new (dell precision 7510). my video card is normal (not bad, not very good), it's not a video gamer card.

Intel HD graphic 530
total available graph memory : 8000 mb
dedicated video memory : 128 mb
system video memory : 0 mb
shared system memory : 8000 mb

why you need a super graphic video gamer card to redraw a simple line ?

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

Re: performance with two screens

Post by ArctionPasi » Thu Apr 21, 2016 2:32 pm

Have you tried with another PC? All laptops can't handle multi-monitors configurations well. The DirectX scene rendering takes time, not the line rendering. Please update your Intel Graphics drivers first.

LC 7 API almost identical to v.6, but a lot has changed inside, such as DirectX11 rendering.
LightningChart Support Team, PT

fredd41
Posts: 113
Joined: Fri Sep 05, 2014 6:46 pm

Re: performance with two screens

Post by fredd41 » Thu Apr 21, 2016 2:54 pm

I tried a lot of computers and the lag is always there

fredd41
Posts: 113
Joined: Fri Sep 05, 2014 6:46 pm

Re: performance with two screens

Post by fredd41 » Thu Apr 21, 2016 3:00 pm

I cannot download the version 7.0.2 on your server.
I receive a timeout message

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

Re: performance with two screens

Post by ArctionPasi » Thu Apr 21, 2016 3:02 pm

LightningChart Support Team, PT

fredd41
Posts: 113
Joined: Fri Sep 05, 2014 6:46 pm

Re: performance with two screens

Post by fredd41 » Thu Apr 21, 2016 3:38 pm

where is Arction.LightningChartUltimate.ScrollBar in your version 7

fredd41
Posts: 113
Joined: Fri Sep 05, 2014 6:46 pm

Re: performance with two screens

Post by fredd41 » Thu Apr 21, 2016 3:41 pm

I have only 140 errors with your new version ;(

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

Re: performance with two screens

Post by ArctionPasi » Thu Apr 21, 2016 3:49 pm

Can you please run the v.7 demo application to see if performance problem persists?
LightningChart Support Team, PT

fredd41
Posts: 113
Joined: Fri Sep 05, 2014 6:46 pm

Re: performance with two screens

Post by fredd41 » Thu Apr 21, 2016 3:53 pm

same problem, the band doesnt follow the mouse cursor, always 1 cm between both positions
the lag disappears when you stop the mouse

fredd41
Posts: 113
Joined: Fri Sep 05, 2014 6:46 pm

Re: performance with two screens

Post by fredd41 » Thu Apr 21, 2016 3:56 pm

what is the maximum size for attachment, i will send you a video

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

Re: performance with two screens

Post by ArctionPasi » Thu Apr 21, 2016 3:59 pm

Keep it under 30 MB
LightningChart Support Team, PT

fredd41
Posts: 113
Joined: Fri Sep 05, 2014 6:46 pm

Re: performance with two screens

Post by fredd41 » Thu Apr 21, 2016 4:03 pm

check the cursor and the mouse, the cursor must be under the mouse, the line is always 1 cm to the right or to the left
same problem with a simple band.
it' is a basic task.
if I create a picturebox, it follows my mouse
http://www.gel.usherbrooke.ca/audio/spi ... 115421.mp4

thanks

fredd41
Posts: 113
Joined: Fri Sep 05, 2014 6:46 pm

Re: performance with two screens

Post by fredd41 » Thu Apr 21, 2016 4:13 pm

here is your "large data open speed test"

there is always a lag between mouse position and band border position

http://www.gel.usherbrooke.ca/audio/spi ... 120653.mp4

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

Re: performance with two screens

Post by ArctionPasi » Thu Apr 21, 2016 4:57 pm

Now I see your point. I verified it with Intel HD 4000 + second display. When chart is only on either of these displays, it renders fast. When it's on both at same time, it renders slow.

With NVidia GTX, I can use 3 displays, my 4K main display and 2 * full HD displays, and stretch the chart on all of the screens at same times, and there's no delay at all.

The issue we are seeing here, is a some kind of limitation of DirectX9 (v.6) or Intel architecture / drivers.

Solution: With Intel HD 4000, it renders fast when using LC 7 and setting chart.RenderOptions.DeviceType = AutoPreferD11, or from demo application's bottom row, select Device Type : Auto-Prefer appearance 11.
LightningChart Support Team, PT

fredd41
Posts: 113
Joined: Fri Sep 05, 2014 6:46 pm

Re: performance with two screens

Post by fredd41 » Thu Apr 21, 2016 5:11 pm

doesn't change, I tried in "large data speed" and "cut line data"

why you need a super video card to redraw a simple line ?

fredd41
Posts: 113
Joined: Fri Sep 05, 2014 6:46 pm

Re: performance with two screens

Post by fredd41 » Mon Apr 25, 2016 11:56 am

hi

did you try to fix the problem ?

thanks

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

Re: performance with two screens

Post by ArctionPasi » Mon Apr 25, 2016 3:13 pm

We'll send a new prototype version for your tests today or tomorrow, in our machine the changes improved performance.
LightningChart Support Team, PT

fredd41
Posts: 113
Joined: Fri Sep 05, 2014 6:46 pm

Re: performance with two screens

Post by fredd41 » Mon Apr 25, 2016 3:29 pm

great
thanks for your work

fredd41
Posts: 113
Joined: Fri Sep 05, 2014 6:46 pm

Re: performance with two screens

Post by fredd41 » Mon Apr 25, 2016 3:43 pm

there is another problem:

in your version 7, check both pictures and see the diffrence between renderer = auto and renderer = AutoPreferD11

with renderer = AutoPreferD11, the graph is not clear.
Attachments
version 7 - renderer AutoPreferD11.jpg
version 7 - renderer AutoPreferD11.jpg (150.99 KiB) Viewed 124787 times
version 7 - renderer auto.jpg
version 7 - renderer auto.jpg (181.42 KiB) Viewed 124787 times

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

Re: performance with two screens

Post by ArctionPasi » Mon Apr 25, 2016 5:33 pm

set series.LineStyle.Antialiasing = None. Then it disables AA.

With Auto, which is DirectX9 in 7.0, the thin lines AA is not supported and that's why you see them crisp.
LightningChart Support Team, PT

fredd41
Posts: 113
Joined: Fri Sep 05, 2014 6:46 pm

Re: performance with two screens

Post by fredd41 » Mon Apr 25, 2016 6:41 pm

if I set :

.RenderOptions.AntiAliasLevel = 1
.RenderOptions.LineAAType2D = LineAntiAliasingType.QLAA
.RenderOptions.DeviceType = RendererDeviceType.AutoPreferD11

The text of each annotation doesn't appear.

fredd41
Posts: 113
Joined: Fri Sep 05, 2014 6:46 pm

Re: performance with two screens

Post by fredd41 » Mon Apr 25, 2016 6:49 pm

and something I receive a fatal error :

{"Render device create failed: Object reference not set to an instance of an object."}

StackTrace:
at Arction.WinForms.Charting.LightningChartUltimate.MMC()
at Arction.WinForms.Charting.LightningChartUltimate.SYC()
at Arction.WinForms.Charting.LightningChartUltimate.WndProc(Message& message)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

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

Re: performance with two screens

Post by ArctionPasi » Tue Apr 26, 2016 8:36 am

I sent the pre-7.1 version for testing the two-screen performance is better than with old 7.0 version. That 7.1 is an early development version with several of known bugs in it. Did it help with the performance?

If it did, we'll include the relevant changes in official 7.1 which is planned to end of May.

Please don't use the early 7.1 version for your development yet.
LightningChart Support Team, PT

Post Reply