LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Higher Priority of VI Causes Worse Peformance

Solved!
Go to solution

Thank you for the advice! I'll keep that in mind.

0 Kudos
Message 11 of 13
(423 Views)

To link to more official answers, also read up here (and the links in it).

 

QUOTE: "The queue is ordered by priority such that higher priority VIs run before lower priority VIs. As long as high priority items are on the queue, lower priority items cannot work their way to the head of the queue and therefore cannot run. This means that starvation of low priority VIs is possible if higher priority VIs run continuously without pausing for a time-out or other asynchronous activity. Because of this, take care when elevating the priority of a VI."

 

Also note that very high priorities (e.g. time-critical priority) will favor processing over the UI thread, making the VI seem completely  unresponsive for long times (no indicator updates, no response to user interactions, etc.).

 

Setting priorities is (virtually) never the solution to solve performance problems. Elegant coding is! Following good practices (in-placeness, better algorithm, etc.) can sometimes give you orders of magnitude improvements while keeping every part of the code happy. Don't play favorites. 😄

 

Of course you cannot make improvements unless you can measure performance, so have a look at our talk from NI Week 2016:

 

TS9524 - Code Optimization and Benchmarking 

 

Enjoy!

Message 12 of 13
(404 Views)

Thanks so much. I've learned a lot from your answer and these material.😊

0 Kudos
Message 13 of 13
(381 Views)