12-06-2023 04:49 PM
Hi,
I realized that when my application is minimized, the cpu load drop 50%. When the front panel is open (not minimized) I have a consumption of 45W and when it's not minimized I have a consumption of 20W. (using Core Temp software).
I tried setting a wait delay of 2sec on all display loops but there is no correlation.
Any idea? I'm working to reduce the heat dissipation of the computer (inside a closed box) and the FP seem to be the main factor !!
Thank you.
Patrick
12-06-2023 04:53 PM
Indeed, if you have a lot of front panel elements, there is additional work in drawing the graphics for the UI elements and updating them with the latest values.
12-06-2023 05:28 PM
I did a copy of the main VI without indicators and I have the same behavior.
12-06-2023 08:51 PM - edited 12-06-2023 08:52 PM
If your computer has high CPU use, blaming the front panel seems very simplistic.
The front panel is an essential part of the UI. What problem do you actually want to solve. How many loops are running (beside the "display loops") and how do they communicate? Do you have lots of value property nodes and local variables? What does your program do?
12-06-2023 09:13 PM
There are 2 background loops that run without any "wait" delay. One that do image acquisition and the other one inspect the images. When minimized, those two loops seem to continue running normally (not slower then when the executable is not minimized).
All "displayed loops" have a wait delay of 250ms and I even tried a 2sec delay and even tried to remove all of them and keep the simple event structure loop. There is no changes on CPU load. There are some value property node but not that many, not that many local variable as well.. Loops are communicating using FGV and global variables.
I'll do more investigation tomorrow. I'll try running only the background loops and see if I have this phenomena.
thanks for helping
Patrick
12-07-2023 10:00 AM - edited 12-07-2023 10:01 AM
Words are typically insufficient to describe a program. Feel free to share some code.
12-07-2023 10:40 AM
I remember an old thread where Transparent borders with overlapping objects caused CPU spikes, probably due to constant redraws.
12-14-2023 03:04 PM
Hi,
Sorry for the delay, I put my energy on the startup of this application.
I tested again and there is no correlation with the numbers of indicators on the front panel ->I removed all indicators and tested the program and I have the same behavior. (20W minimized and 45W not minimized)
Added counters on my loops and it's as fast minimized or not minimized...
Hard to understand.
I attached the FP (blured)