LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Buildup EXE too big

Solved!
Go to solution

After I buildup the exe, it is 28M. After it runup, it will be 97M in memory.

 

Is it possible to make the exe size smaller. Thanks.

0 Kudos
Message 1 of 12
(4,004 Views)
Do you hve a couple of large arrays and/or clusters in your program? The 97 meg of memory will be program data, so your only way of making the memory footprint smaller will be more efficient handling of data or writing more data to disk.
_____________________________
- Cheers, Ed
Message 2 of 12
(3,999 Views)

Hi,

 

The "empty" LabVIEW application will take approx 150 kB on the disk and 26 MB in memory. Rest is your code.

If you have pretty big size of the application, then check constants on the block diagrams and controls/indicators on the front panels as mentioned above.

In additional, you can use the following tools - Performance and Memory and VI Metrics (both available from Tools->Profile) and Memory Usage in VI Properties (available from menu File->VI Properties...)

 

Andrey.

Message 3 of 12
(3,989 Views)
Without repeating what was said above (which I agree with), if you are using vision, make sure your references are closed before you build.  During debug, I have a control that lets me keep the image references open after execution, so I can actually see what's going on, and if you build it right then, the dll turns from 800k to the size of image in memory plus 800k.  It should probably be reported as a bug, but I think it enforces good practices when working with large image references.
Message 4 of 12
(3,970 Views)

How big is your exe normally, is 28M too big or it is ok for LV.

 

The problem is after buildup, it seems runup very slowly. Since I have a heartbeat check with the server side program. it cannot runup all the time.

 

Also the log file is empty, at least should be some startup trace in it.

 

Is it possible to put some function into another DLL when compile it, but I worry I use few global variable in all the important vi for Exit.

 

Also very strange, I never use a library, but it need to be included into my subvi folder, or the compile cannot made. Then many DLLs will be related into the buildup. 

 

0 Kudos
Message 5 of 12
(3,943 Views)
Also it is running quite well before buildup.
0 Kudos
Message 6 of 12
(3,936 Views)

Hi turbot,

 

so many words and such less information...

 

"it seems runup very slowly. Since I have a heartbeat check with the server side program. it cannot runup all the time."

- Starting a 28MB exe may take it's time (including init of dlls): Seems increasing watchdog time may be easier here?

 

"the log file is empty"

- Which logfile are you talking about? Why should there be some traces?

 

"put some function into another DLL"

- Why do you want to put functionality in DLLs?

- Why another DLL? Do you already create DLLs?

 

" use few global variable in all the important vi for Exit."

- Do you use more than one vi for exiting your program? Why? Why using globals?

 

"never use a library, but it need to be included into my subvi folder"

- What do you refer to with it? Are you talking about a Labview library (*.llb) or a DLL?

 

"many DLLs will be related into the buildup"

- Do you use any toolkit (like Vision, IMAQ)? They need their libraries and DLLs included in the built exectable...

 

- You seem to use more globals in the program. How much data is kept in globals?

- How much static data (aka constants) are kept in the program?

- Do you use background graphics in the panels?

- Do you use "current vis path" to build the path to logfiles? do you know that path changes when building an exectable? Do you correctly get the path to all needed files?

- Do you show any error clusters to provide more specific error messages?

 

You see, all your sentences throw up more questions. Please provide more information to your very generic question...

Message Edited by GerdW on 11-23-2008 09:43 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 7 of 12
(3,914 Views)

"it seems runup very slowly. Since I have a heartbeat check with the server side program. it cannot runup all the time."

- Starting a 28MB exe may take it's time (including init of dlls): Seems increasing watchdog time may be easier here?

 

"the log file is empty"

- Which logfile are you talking about? Why should there be some traces?

Own log. Need to trace. 

 

"put some function into another DLL"

- Why do you want to put functionality in DLLs?

Make exe smaller.

- Why another DLL? Do you already create DLLs?

Make exe smaller. Not yet.

" use few global variable in all the important vi for Exit."

- Do you use more than one vi for exiting your program? Why? Why using globals?

Yes, different condition check. Communicate different vi.

 

"never use a library, but it need to be included into my subvi folder"

- What do you refer to with it? Are you talking about a Labview library (*.llb) or a DLL?

A *.llb by labview

 

"many DLLs will be related into the buildup"

- Do you use any toolkit (like Vision, IMAQ)? They need their libraries and DLLs included in the built exectable...

No.

 

- You seem to use more globals in the program. How much data is kept in globals?

- How much static data (aka constants) are kept in the program?

Very few.

- Do you use background graphics in the panels?

No.

- Do you use "current vis path" to build the path to logfiles? do you know that path changes when building an exectable? Do you correctly get the path to all needed files?

All fine.

- Do you show any error clusters to provide more specific error messages?

Cannot see from exe.

0 Kudos
Message 8 of 12
(3,903 Views)

Because some functions may not use all the time, and cost memory if load from startup.

 

Can I make it as DLL? Just load and use it when needed. And release the memory after usage.

0 Kudos
Message 9 of 12
(3,869 Views)
Solution
Accepted by topic author alex.

Hi turbot,

 

IMHO DLLs will be loaded at startup time, too. So no uptime improvement nor decreased memory footprint at startup.

 

You can put seldomly used functions into LLBs and call those vis via server functions - this way they will load when called!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 12
(3,866 Views)