LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Long delays when saving or loading labview .vis

I have noticed as my program got larger, that everything has slowed down as far as loading and saving the vi's. I seemed to have tracked it down to a few vi's which are run in re-entrant mode. I call this vi Move.vi. It is called at least 150 times within my entire program. Any time I make a small change to this vi, and save, it takes almost 1 minute. If I change the properties of the vi to Non-Reentrant (which also takes me 1 minute just to see the effect change while the Windows CPU usage hits 100%), the problem is solved.

Within this vi, I am creating a local reference and passing it to yet another vi, which eventually calls a vi (passes the reference) and continues without waiting for the called vi. to finish (I do end the reference when it is done).

I am not sure if this is the cause, but it is getting worse as I add more of these Move.vi's into my program. Any ideas?

PS. This vi is only 56KB large. The vi above it (which calls Move.vi 150 times within its loops), is 1.4MB large.
0 Kudos
Message 1 of 4
(2,683 Views)
A re-entrant vi causes LabVIEW to effectively create many instances of the code, each with its own code space in memory, so when you make a change it has to go do it many places. When it is non re-entrant labVIEW is pointing to only one instance, even when referenced from many points in the program.

P.M.

Message Edited by LV_Pro on 06-17-2005 04:56 PM

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 2 of 4
(2,674 Views)
Can your code be restructured to reduce the number of times it is called? Without knowing a thing about either the calling program or the called sub-vi's function, 150 instances of a non re-entrant vi seems like a lot in a vi that is only 1.4M in size.


P.M.
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 3 of 4
(2,671 Views)
On a side note, may I ask what the reason is that you set it to reentrant, this would only make sense if each instance retains local data. But 150 instances!? (See also a similar discussion in this earlier thread. Are the results correct if the VI is not set to reentrant? Any difference in execution time?

150 different calls of a reentrant VI in a single VI seems like a mindboggling nightmare. Even tightly tiled, these VIs alone would occupy ~400x400 pixels on the diagram. There has to be a better way to do this!


@dre99gsx wrote:
Within this vi, I am creating a local reference and passing it to yet another vi, which eventually calls a vi (passes the reference) and continues without waiting for the called vi. to finish (I do end the reference when it is done).
What kind of reference (VI reference, control reference, etc.). So you probably create 150 individual references (one for each reentrant VI). Are you sure you're closing all of them?
Can you provide some details on your project, maybe share the small VI with us. 😉
0 Kudos
Message 4 of 4
(2,655 Views)