LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How did you learn about performance issues?

I've been thinking about trying to get a LV certification, so I tried out the online test, and I've got a few questions about learning LV on a deeper level.

One question asked whether it is more efficient to cast each piece of an array as its being built in a for loop, or to cast the entire array at once, after the array has been created.

Another question asked, if array indexing is enabled on the output of a while loop then is the array resized on every iteration?

I can make guesses at how LV works, but I really don't know what goes on under the hood. How do you pros know what's really going on with your code?

Also for anyone out there who has been certified, can you pass the test with just experience, or do you have to undergo some NI training to learn some things? Has LV certification been beneficial to you?

Thanks,
John
Message 1 of 6
(3,012 Views)
John,

I'm glad you posed this question; I'm interested in what others have to say.

A few ideas on how to learn about performance:

1. Performance is specifically covered in the LabVIEW Intermediate II course taught by NI.
2. There's typically a performance-oriented session or two at NI Week. In addition to listening to the presentation, you can grab the presenter afterwards and unleash your questions on him/her. These kinds of presentations may also be given at NI Days or NI Technical Symposiums that NI gives worldwide; check the agendas.
3. Experiment with real code.

The Intermediate II course establishes some general principles that help answer many performance-oriented questions (e.g. the first test question). But some questions aren't easy to answer, even knowing these principles (e.g. the second test question). Also consider the fact that we are constantly trying to improve LabVIEW, so the answers can and do change over time! This is where the direct interaction with experts and experimentation are so valuable.

Steven H.
0 Kudos
Message 2 of 6
(2,999 Views)
Thanks Steve,

To follow up, mostly for curiosity, is it better to cast an entire array all at once? And are arrays resized at every iteration on the output of a while loop?

- John
0 Kudos
Message 3 of 6
(2,974 Views)
Better to cast or convert inside the loop - otherwise you end up with two copies of the array outside the loop - one of type A (pre-conversion) and one of type B (post-conversion).

The While loop certainly won't reallocate with every iteration. When the buffer becomes full, LabVIEW allocates more than just another element's worth of space. I believe the allocations are superlinear up to a certain buffer size, then become linear after that.

Steven H.
0 Kudos
Message 4 of 6
(2,956 Views)
Hi John,

I have mentored 2 1/2 CLA's (the 1/2 is the "Architect Supreme" and she really only needed encouragement).

Here are my suggestions.

1) Study for the test you plan to take. Studying above the test level you are after can only confuse things.

2) If you can get the funding, take the NI courses suggested for that test. Some of the Q's come from the text.

3) Monitor this Exchange for questions regarding performance and speed.

4) Use the search box at the top of this page and search for "Greg McKaskle". Some of the best performance info available is in his writtings.

5) Use the "info-LabVIEW" serach engine that can be found at

http://www.searchview.net/

and search fro Greg McKaskle and Rolf Kalbermatter. Again great information.

6) Make a habit of using the "Task manager>>> Performance screen while you are devloping and testing. It is a good way to find out what things are good and which are bad. You find out subtle things like straight line interpolation on a chart is faster than step interpolation.

7) Read all of the LV release notes. The questions you posted are answered in those docs and changed in LV 6.0.

😎 Review the LabVIEW ZONE challenges. They are competitions based on performance. Read the reviews.

9) Read the white papers. Do not miss 144!

10) Start posting Q's on this Exchange. Let us expert (myself excluded) that prowl this list help out.

Done for now,

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 5 of 6
(2,944 Views)
John,

Heres a link that takes you to a page with many links on performance issues and optimisation.
Some of the documents here are VERY helpful.

http://zone.ni.com/devzone/devzone.nsf/webcategories/7F6F464042305247862567AC00580B83

Goodluck!

- Gurdas
Gurdas Sandhu, Ph.D.
ORISE Research Fellow at US EPA
0 Kudos
Message 6 of 6
(2,896 Views)