01-27-2020 10:48 PM
What are the exact processes that happen in the background when we are creating an executable using LabVIEW ? Why is it that the performance of the application is better when running as an exe ?
01-27-2020 10:57 PM - edited 01-27-2020 10:58 PM
You can get similar performance in the development system if you do certain streamlining such as disabling debugging and keeping unneeded front panels closed.
How much "better" are you seeing? How do you measure the difference?
01-27-2020 11:35 PM
The launch time for application drastically reduces. My main motive behind this question is to know what actually happens when we create exes like binding, packing etc.
01-28-2020 12:02 AM
It wasn't clear you are talking about startup time. Well, an executable does not need to load the editor, pallettes, and all that.
01-28-2020 02:59 AM
Broadly speaking, a LabVIEW executable works exactly the same as running the code inside LV does - you have hierarchies of VIs calling each other and each VI has its machine code which is executed when the VI is called.
When you build an EXE, the basic process that happens is that LV will recompile the VIs while trying to optimize them, then save all of them in a new hierarchy (which you can see if you go to the build folder while a build is running) and compress that hierarchy into a single file with some extra binary code to load and manage everything.
This description is an oversimplification (for instance, LV might not always recompile or optimize the VIs, etc.) and can also depend on various build settings (like enabling debugging, which can retain the BD as part of the VI), but it includes some things which could improve load time. For example:
If you design your application to have dynamic loading of resources or precompiled resources (packed libaries, which are similar to DLLs), you could probably get better load times, including in LV itself, but that's more complicated and not necessarily worth it.