Efficiency of LabVIEW application

Currently, I'm facing the problem of LabVIEW execution efficient. Thus, I found a book which simply can help my programming skills in LabVIEW and eventually can solve my problems. ^^

The following notes are written by P. A. Blume, The LabVIEW Style Book  
  1. An efficient LabVIEW application executes quickly, without performing unnecessary operations, particularly ones that are performed repeatedly within looping structures.
  2. An efficient application also conserves memory by limiting the size of the four LabVIEW memory components: the front panel, block diagram, data space, and code.
  3. Front panel and block diagram memory store the graphical objects and images that comprise the front panel and block diagram, respectively.
  4. Data space memory contains all the data that flows through the diagram, as well as the diagram constants, default values for front panel controls, and the data that is copied when written to variables and front panel indicators.
  5. Code is the portion of memory that contains the compiled source code.
  6. Efficient applications minimize I/O operations, such as GUI updates, instrument and network communications, and data acquisition (DAQ) calls.
  7. Execution speed and memory use are related.
  8. Memory and disk operations are a principal source of latencies in all modern computing devices. As memory consumption grows during the execution of an application, LabVIEW's memory manager is called upon to allocate new and larger memory blocks. This causes a delay while the memory manager runs and results in fragmented memory, for which some of the previous blocks are not efficiently used. The memory manager is a wonderful aspect of LabVIEW that handles memory allocation automatically. However, developers should be aware of the types of operations that might cause it to run and avoid these situations from occurring unnecessarily.
  9. Tools>>Profile>>Performance and Memory is directly measures the execution speed and data memory of all VIs loaded in memory. This tool helps to improve the efficiency of an application.
  10. Use the Profile Performance and Memory window to determine which VIs consume the most time and memory, and examine those more closely. We can optimize our VI's efficiency by iteratively making improvements and checking the profile metrics.
  11. The Profile Performance and Memory window is best used for measuring the change in efficiency of a single application when incremental modifications have been made.
  12. An alternate method of evaluating efficiency is simply to inspect the application for sources of inefficiency.
  13. Look for unnecessary operations within loops and for operations that create new data buffers. For example, contains many nodes within the main While Loop (includes read local variables, which make copies of their data when read from, and Property Nodes that are written within every iteration, regardless of whether their value has changed).
  14. Tight loop is several control terminals are polled within the innermost While Loop as fast as the loop can run.
  15. High-speed GUI polling is not an efficient use of the processor (most humans cannot distinguish between a 1 ms and a 100 ms GUI response).
  16. More efficient alternatives include adding a delay using the Wait (ms) function or using an Event structure to service all user interface activity, and these alternatives free the processor to work on parallel tasks and applications.
  17. Event structures are the most efficient method of capturing user interface activity.
  18. Shift registers are much more efficient alternatives to variables, and queues are more much more functional.
  19. Makes good used of sub VIs can increase memory efficiency, but uses sequence structures can decrease processing efficiency.
  20. SubVis reduce the quantity of nodes on the diagram and reduces block diagram memory.
  21. LabVIEW can reclaim memory buffers used by subVIs when the subVIs are not executing, thereby reducing data memory use.
  22. Sequence structure is called, all frames must execute through completion, in consecutive order.
I will continue share the useful tips from this book since I'm reading it. I hope it is useful for you all too.


Popular posts from this blog

Split Container Control in C#

LabVIEW State Machine Basic Example

Calling Win32 DLLs in C# with P/Invoke