LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why does LV8 use 3 times more memory than LV7?

Hi,

Why does LV8 use 3 times more memory than LV7?

 

When I load my main vi in LV7 it labview uses 300Mb in taskmanager, hwen I load that same vi in LV8 it uses 1Gb. In my main vi I have 50 copyes of 1 reentrant vi. I am running the same vi 50 times in parallel and it works fine in lv7.

The time to load the vi in lv8 is increasing from seconds to over 30 minutes.

 

Is there any way to avoid this huge memory usage?

 

Smiley Sad Rune

Message 1 of 9
(3,090 Views)
You should do a mass-compile of your application to update it to LabVIEW 8 and see if that makes a difference.
Message 2 of 9
(3,059 Views)

Thanks for the suggestion

Mass compiling of my application makes no difference.

Message 3 of 9
(3,027 Views)
What is reentrant VI doing? Do you have a bunch of global variables in it? Are you dealing with large arrays? Lots of strings? Does the memory consumption happen when you load the VI, or run the VI? Your message seems to be saying both things so it's not clear at what stage you're seeing this memory jump. Keep in mind that LV8 has a bigger memory footprint. On my machine it's twice as much. LV7 with no VIs open is about 25 MB, LV8 is about 50 MB.
Message 4 of 9
(2,991 Views)
My reentrant vi is testing software on a transducer connected to a serialport and i have 50 serialports connected to my pc.
i am not using global variables or big array , my memory consumption happens when i load the application not when i run it.
 
 
0 Kudos
Message 5 of 9
(2,951 Views)
50 serial ports?!? Gee, maybe you might want to think of a better communication bus for that many connections, but that's another story.

I strongly suspect it's something to do with your code since I created a reentrant VI and then a top-level VI that had 50 instances of this. I found that LV8 used *less* memory than LV7. Granted, a simplified example, but if there were a fundamental problem I would have expected a substantial difference in the opposite direction.

Is it practical for you to post your code?
0 Kudos
Message 6 of 9
(2,923 Views)
Check that Allow debugging in the Execution menu of the VI properties is turned off.  LV8 introduced the ability to use breakpoints and highlight execution on reentrant VIs.  However, this uses more memory.  The default is off, so this may not be your problem, but it is worth a look.
0 Kudos
Message 7 of 9
(2,881 Views)

Hi,

Using the re-entrant option was not as easy as I first think and I think there is some major change from lv7 to lv8.

 

My starting point was an application ment for testing one transducer and turning this to test 50 transducers at same time to reduce production time.

 

 It looks like if you want a vi to be fully re-entrant all his sub vi must be re-entrant as well. So if your vi has 1 sub vi that is used 10 times and you want to run 20 copies of your vi re-entrant LabView will generate 200 copies of your sub vi.

 

I think this combined with the new futures to debug reentrat vi’s is the answer to my huge memory usage. Note that there is a difference between lv codes and sub vi’s. I replaced one of my sub vi (see attatched vi) with its code and get rid of  250 Mb memory. And as I wrote this I come to think of the enable debug mode in execution dialog under vi properties, and I was right by disable this even more memory was relived. The enable debugging is enabled by default when entering the re-entrant mode, perhaps not so smart?

 

So now I am down to 290Mb of memory usage.

 

Smiley Indifferent Rune

 

0 Kudos
Message 8 of 9
(2,876 Views)
I fully commisserate with Rune!

I am running a VI right now for a new vacuum system.  For monitoring purposes, it has three charts, with 4,3, and 2 data feeds into them respectively.  I have changed the chart history to keep track of 50000 data points so I can watch for vacuum deviations over long periods of time to assess their frequency during nights and weekends.  This is a temporary set-up until all of the kinks are worked out, but still my application runs on 410Mb!  Simply editing the VI without clearing the chart histories is as tedious as tryingto recieve large email attachments on my old 14400 modem way back in the 20th century!  This is on a Pentium 4 processor with 960Mb of RAM and  a 3GHz processing speed.

What's scary is that this vacuum system is  a small part of a larger system which will be part control system and part data analysis.  Although I won't implement any chart records simultaneous, I wonder to what extent I will have to be very careful with my programming...

Brad
0 Kudos
Message 9 of 9
(2,866 Views)