11-05-2022 02:02 AM
Thank you for the advice! I'll keep that in mind.
11-05-2022 11:20 AM
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!
11-06-2022 06:31 AM
Thanks so much. I've learned a lot from your answer and these material.😊