11-21-2008 04:04 AM
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.
Solved! Go to Solution.
11-21-2008 04:23 AM
11-21-2008 04:40 AM
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.
11-21-2008 06:38 AM
11-23-2008 03:34 AM
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.
11-23-2008 03:47 AM
11-23-2008 02:41 PM - edited 11-23-2008 02:43 PM
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...
11-23-2008 08:01 PM
"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.
11-24-2008 07:34 AM
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.
11-24-2008 07:38 AM
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!