LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labvew packed library RAM usage

Solved!
Go to solution

Hi,

I built my app as an exe file and when it was started the RAM consumption was about 300 MB.

I decided to distribute it as a small exe file (launcher) and some necessary packed libraries (Kernel module = Main app, module1, module2, .... moduleX).

When only the Kernel module is loaded, the RAM consumption is about 250MB. When all modules are loaded, the RAM consumption is about 750MB. There is some packed library shared dependency. All ppls are required dlls located in the same folder to prevent duplicate dependancies loading. All modules are dependent on the Kernel module.

 

I am wondering if it is default behaviour of ppl loading to increase RAM usage or if there is some way to minimize it

0 Kudos
Message 1 of 4
(2,816 Views)

The Runtime engine takes up quite some memory, so the numbers you see isn't uncommon.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 4
(2,763 Views)

Hi,

I would start with reading theese two articles » http://labviewjournal.com//?s=Packed+Project+Libraries

In your case it really depends on what are the relations between PPLs in you application. It's possible your application architecture follows some of the call-chain scenarios in the articles above. Aka there might exist multiple lvlib copies within your compiled lvlibp(s) which are entirely loaded (with all dependencies) when any of the library member is invoked.

 

Ondřej K.

CLA, CTA, CLED
Message 3 of 4
(2,744 Views)
Solution
Accepted by charlie87

A packed project library contains all of its VI dependencies. This means that if LibA.lvlibp and LibB.lvlibp both call Dependency.vi, then Dependency.vi will be in both LibA and LibB and it will get loaded twice when the PPLs are loaded.

In an executable, the dependencies are only included once.

It is one of the tradeoffs/downsides of using packed project libraries.

You can minimise this for your own project dependencies by putting them into their own PPL and then updating LibA and LibB to reference the VIs in the new PPL. Of course, this won't help for LabVIEW/VI.lib dependencies.


LabVIEW Champion, CLA, CLED, CTD
(blog)
Message 4 of 4
(2,739 Views)