User Tools

Site Tools


kb:labview:performance

91 Performance

General Tipps

  1. Use Inlining
  2. Use Static Dispatch for objects
  3. Use global variables
  4. Remove anything that's not REALLY needed

Other, not-so-big improvements (might or might not help):

  • Disable “Allow Debugging” in VI properties
  • Restart the whole system
  • Allowing implicit type casts

Libraries and Memory

  • Most library types do not load their member VIs into memory.
  • Classes and XControls are the only two types of libraries that load their member VIs.
  • All library types do load their nested libraries, though.
Library Type Loads Members
.lvlib no
.llb no
.lvclass yes
XControl yes
.ppl yes

LabVIEW uses the Read Link Info application method to harvest the linker graph info (know what to list in dependencies) without loading the files' contents into memory.

More details about Loading VIs on the LabVIEW Wiki.


Reentrancy

When dynamically launching cloneable instances, the shared vs. preallocated reentrancy setting doesn't matter. There's nothing to preallocate (due to the fact that the VI in question is never executing as a static subVI call), so a shared clone pool will always be used.

A reentrant VI with uninitialized shift registers (or feedback nodes, or any stateful data store) may have issues where a clone that goes idle is reused from the clone pool on a subsequent launch of the VI.

The 'preallocated' setting only affects static subVI calls of reentrant VIs. It means nothing for dynamically launched clones (like DQMH or AF).

There's always a pool, since LabVIEW doesn't know if you'll ever launch clones dynamically while the code is running. The VI setting just defines whether or not LabVIEW traverses the VI hierarchy to be able to find static sources to pre-allocate or not. Also, LabVIEW has some heuristics for optimizing memory manager hits so that it's not allocating 1 at a time, but rather groups of clones for the pool.


Memory Management

LV Champions Forum

Performance Monitoring

Real-Time

kb/labview/performance.txt · Last modified: 2025/04/17 21:53 by 84.68.115.127