LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Property nodes are severely affecting performance

Solved!
Go to solution

LabVIEW Gurus,

 

I am continually running into some serious performance hits using property nodes to update attributes of FP objects. Attached is a classic example.

 

I have 8 XY plots that are being fed 600 SGL points every 200 msec - a very modest data rate. Each plot is a dynamically instanciated .vit placed into one of 8 subpanels in a container VI. The container VI also acts as the data server for the charts, sending each one their data in their own single element queue. The entire architecture runs great (~4% CPU load, see attached picture) until I being updating a property node to display the value of the cursor y-value. When I enable the "Caption.Text" property node of the XY Graph to display the cursor value, the CPU usage soars to over 30%.

 

As an aside, I am developing on a dual core 2.1GHz platform with 4G memory with LV8.5.1, and the target machine is not nearly as beefy. That's why 30% CPU on my powerhouse is an issue - it basically brings the embedded target to its knees.

 

I have included an example VI for you to run on your machine. Consider it "representative" of my bigger issues. The VI runs about 10% CPU without the caption update, and 20% with the caption updates.

 

Finally, I have tried putting the VIs into the UI execution system. I have also tried Defer Panel Updates, but this actually slows down performance.

 

Best regards,

Jack Dunaway

 

 With Captions

With captions

 

Without Captions:

Without Captions

Message Edited by mechelecengr on 10-10-2008 11:23 AM
Message Edited by mechelecengr on 10-10-2008 11:27 AM
0 Kudos
Message 1 of 8
(3,836 Views)
Solution
Accepted by JackDunaway

 

Use captions only for non cyclic display. Using a text indicator should solve the problem.

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
Message 2 of 8
(3,822 Views)

Chris,

 

Excellent solution - it elegant enough solution to fix my problem. However, I am still perplexed as to why a single property node bumped my CPU from 4% to 33%, even though that PN is only being updated every 200msec (times 8 graphs). Can anyone explain?

 

Jack

0 Kudos
Message 3 of 8
(3,808 Views)

Yes, property nodes force synchronous execution and if you do that too often, other things suffer.

 

The above solution is good. You can simplify things even more by removing all that unneeded extra code that just complicates things.

Here's a quick draft. Let me know if you have questions.

 

Message Edited by altenbach on 10-10-2008 09:58 AM
Download All
0 Kudos
Message 4 of 8
(3,807 Views)

mechelecengr wrote:

Can anyone explain?


DFGRay explains it here. 😄

0 Kudos
Message 5 of 8
(3,803 Views)

It may also be OS related.  When I ran the VI on my Mac I found about 10-11% CPU with the caption updating on and 13-14% with it off.  I added a string indicator and it ran at about 8-9% CPU.

 

LV 8.5 MacPro (Intel) OS X 10.5.5.

 

Lynn 

0 Kudos
Message 6 of 8
(3,797 Views)

Don't forget that the original code has 8 graphs and 8 captions, and thus needs to deal with 8 individual property nodes with each loop iteration. 😮

Message Edited by altenbach on 10-10-2008 10:59 AM
0 Kudos
Message 7 of 8
(3,771 Views)

Lynn,

 

Your performance seems backwards - you mean it runs faster than when it's not updating? Thanks for the feedback - It's good to know that I have some willing benchmarkers.

 

Christian,

 

Thank you for your sage advice once again. 10k - money!

 

and finally Chris,

 

Thanks again for your solution.

 

Regards to all,

Jack Dunaway

0 Kudos
Message 8 of 8
(3,763 Views)