LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Building Executables

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 ? 

0 Kudos
Message 1 of 5
(2,518 Views)

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?

 

0 Kudos
Message 2 of 5
(2,509 Views)

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.

0 Kudos
Message 3 of 5
(2,479 Views)

It wasn't clear you are talking about startup time. Well, an executable does not need to load the editor, pallettes, and all that.

0 Kudos
Message 4 of 5
(2,472 Views)

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:

  1. Since all of the VIs are in a single file it would be faster to load from disk.
  2. If unused class items are removed during the build, then there's no need to load them.
  3. If there are no block diagrams or front panels in subVIs, there's no need to load them and the VI size could be smaller.

 

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.


___________________
Try to take over the world!
0 Kudos
Message 5 of 5
(2,428 Views)