LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Slow and laggy Front Panel selection at edit time

Solved!
Go to solution

Very simple one. Create a Waveform Graph, fill it with a million points. Now click and drag on the front panel to select something, and wiggle the mouse around a bit. The selection update is very laggy, and LabVIEW maxes out a CPU core. Resizing the window has the same effect.

 

slow_selection_high_CPU.png

 

Even just clicking and dragging on a completely empty front panel has the CPU jumping into the double digits (~30% in my VM).

 

Tested in LV2018 on Win10, and in LV2016 on Win7. Issue not found in LabVIEW 8.5 (the only other version I had to hand), where Task Manager shows LabVIEW using 0% CPU. I suspect it was introduced in LV2016 along with all of the other live dragging and live updating features. My best guess is the semi-transparent selection box, and LabVIEW needing to iterate through every front panel item, work out what object pixels fall within the selection region, then draw the semi transparent overlay. Repeat for every single mouse move event.

 

Thankfully there are labview.ini keys to disable these features. Is there a secret ini key to bypass this issue too?




Certified LabVIEW Architect
Unless otherwise stated, all code snippets and examples provided
by me are "as is", and are free to use and modify without attribution.
0 Kudos
Message 1 of 12
(4,320 Views)

The solution is simple. Don't pretend that you are plotting a million points (because you aren't). You are at most putting a couple hundred points on the screen with LV decimating the blazes out of your data to get it to fit - that is what is taking all the time...

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 12
(4,304 Views)

No data. 35% CPU.

 

empty_graph_high_CPU.png

 

In any case this is edit time. I'm not pushing a million points to the graph in a loop. The data is static.

 

Edit: And this wasn't an issue in older versions of LabVIEW.




Certified LabVIEW Architect
Unless otherwise stated, all code snippets and examples provided
by me are "as is", and are free to use and modify without attribution.
0 Kudos
Message 3 of 12
(4,300 Views)

Hi Michael,

 

delete the chart: how is CPU usage changing?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 12
(4,278 Views)

With a new blank VI it hovers around ~15%, but can get as high as 20%.

selection_high_cpu.png

 

Though if I make the front panel much larger and perform a larger selection, LabVIEW easily hits 50% CPU.

selection_50pct_cpu.png




Certified LabVIEW Architect
Unless otherwise stated, all code snippets and examples provided
by me are "as is", and are free to use and modify without attribution.
0 Kudos
Message 5 of 12
(4,273 Views)

Hi Michael,

 

sounds like a problem with your specific computer and its graphics system.

 

Do you see the same on a different computer?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 12
(4,270 Views)

Just tested on a spare Win 10 machine (quad core i5) with LV2018 and the CPU is around 20-25%.

selection_real_hardware_LV2018_high_cpu.png

 

I then uninstalled LV2018, and installed LV2015 (the last version before LV2016 began the live wiring changes and semi-transparent selection box change). The CPU is around 2-3%.

selection_real_hardware_LV2015_low_cpu.png

 

Even with a 50 million point waveform in a Waveform Graph, the CPU doesn't reach double digits.

selection_real_hardware_LV2015_50Mpts.png

 

Is there an equivalent labview.ini key to LiveDrag to disable the new selection logic?




Certified LabVIEW Architect
Unless otherwise stated, all code snippets and examples provided
by me are "as is", and are free to use and modify without attribution.
Message 7 of 12
(4,262 Views)
Solution
Accepted by topic author MichaelBalzer

I just tried LiveSelection=False in labview.ini, and that's done the trick. No more laggy semi-transparent selection, and single digit CPU usage. It's so much more responsive now.

selection_liveselection=false.png




Certified LabVIEW Architect
Unless otherwise stated, all code snippets and examples provided
by me are "as is", and are free to use and modify without attribution.
Message 8 of 12
(4,256 Views)

Thanks - solved problem on my new Macbook Pro 16" running LV2020 in bootcamp.  Lag was pretty bad, making it hard to align things.  Thought that bootcamp might have been the problem, but did not make sense as LV with Apple hardware in bootcamp has been otherwise very speedy.  Just added "LiveSelection=False" to the end of "C:\Program Files (x86)\National Instruments\LabVIEW 2020\LabVIEW.ini".  Dragging front panel objects at design time is once again as it should be!

 

0 Kudos
Message 9 of 12
(3,036 Views)

May have spoken too soon - editing was responsive right after re-starting LV, but after my huge ECG plot loaded, then went back to editing, everything was slow again.  I cleared the XY graph plots from right-click menu on the plot, and UI editing was once again snappy - seems that LiveSelection=False did not really solve the issue for me concerning large amounts of data left over in an XY graph while editing in-between runs of the VI.

0 Kudos
Message 10 of 12
(3,031 Views)