02-01-2016 05:23 PM
I have a few VIs that pull in a lot of dependencies and take a really long time to open in the IDE. I have been playing around with changing the "Call Setup" to some of these to be "Load and Retain on Call", which if done correctly*, can effectively defer a lot of the wait time from edit time to run time.
*[need to make sure that there is at least one extra level of nesting between the VI that you are opening and the VI that is set up to "load on call", to actually prevent the IDE from loading that VIs dependencies. See also: http://forums.ni.com/t5/LabVIEW/When-would-you-use-quot-Load-and-Retain-on-First-Call-quot/td-p/3212... ]
But we also have a few places where a particularly dependency-laden VI needs to be run asynchronously. In those cases, we use a strict static VI reference to make sure we have the correct connector pane prototype for the asynchronous call by reference node (ACBRN). We also use a static reference so we are guaranteed to have the VI in memory at build time (if we just used a path, then we wouldn't know until run time if the file moved on disk and the application was broken).
The static VI reference forces the IDE to load in all the dependencies of this VI. 😞
So, my question is: is there some way to get a static VI reference to act like the "load on call" behavior?
I would love to have a solution that combines the benefits of:
02-01-2016 05:36 PM
If I understand correctly, what you want is a partial load of a VI, where the compiler loads just enough of the VI to verify the connector pane and nothing else. I haven't seen anything that would suggest this can be done, although I suppose it's possible there's a hidden method for it somewhere.
02-01-2016 05:36 PM
...I'm kinda of tempted to say that static VI references are broken--or at least pretty unintuitive--since they don't behave this way natively.
By which I mean:
A static VI reference only really gets you information about the VI on disk; you can't just call the Run method on a static VI reference, you need to open a *new* reference specifically for running. So it would seem to me that a static VI reference should by default refrain from loading in the VI and all its dependencies at edit time.
02-01-2016 05:49 PM
@nathand wrote:If I understand correctly, what you want is a partial load of a VI, where the compiler loads just enough of the VI to verify the connector pane and nothing else. I haven't seen anything that would suggest this can be done, although I suppose it's possible there's a hidden method for it somewhere.
Yes. I guess what I want is a "lazy load" static VI reference.