LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Debug and deploy build specification

Hello,

 

I am looking for some clarification regarding EnableDebuging flag in build specification, especially part saying 'disabling does not ensure full optimization'. 

How can I ensure full optimization? I think we can set compiler level to 10 before build.

 

How is DisableDebugging related to individual VI settings in build specification? When debugging is disabled for build but enabled for vi what happens?

 

pawhan11_0-1585315277665.png

 

0 Kudos
Message 1 of 8
(3,580 Views)

@pawhan11 wrote:

Hello,

 

I am looking for some clarification regarding EnableDebuging flag in build specification, especially part saying 'disabling does not ensure full optimization'. 

How can I ensure full optimization? I think we can set compiler level to 10 before build.

 

How is DisableDebugging related to individual VI settings in build specification? When debugging is disabled for build but enabled for vi what happens?


For full optimization the Build should not have Debugging enabled ...

What happens is that the block diagram is included in the build so that you can connect to the program and probe data and suff. Therefore all optimizations can't be used. So, what happens when it's disabled for build but enabled for vi? That's a normal program. 🙂

/Y

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 8
(3,567 Views)

So when I have debugging disabled in build specification I also have to go and change settings of each individual vi to disable debugging to have full optimization? 😣

0 Kudos
Message 3 of 8
(3,539 Views)

@pawhan11 wrote:

So when I have debugging disabled in build specification I also have to go and change settings of each individual vi to disable debugging to have full optimization? 😣


No. The implication of the phrasing at the tickbox is that if you remove debugging, you will get all optimisations.

 

Of course, what level you get if you enable debugging is unclear, at least to me.


GCentral
0 Kudos
Message 4 of 8
(3,536 Views)

For release build I ended up doing:

- compilation level 10

- disable debugging

- tend to remove error cases when placed inside subvis, hard to read this just pass the error instead, native functions will not execute on error anyway

- place all project structure in one common root virtual directory containing all source VIs and uncheck allow debugging on this folder

 

pawhan11_0-1587232895665.png

 

Is there something more that can be done to ensure full optimization?

I am more interested about various build build settings, than source code modifications.

 

0 Kudos
Message 5 of 8
(3,447 Views)

The full (and confusing) answer to your question is here:

https://zone.ni.com/reference/en-XX/help/371361R-01/lvhowto/compiler_optimizing_for_execution_speed/

 

It details all of the tweaks you can make on build specification at the highest level and per VI.  Some settings seem contradictory but are to force a discrepancy between the VI properties in a saved VI and the VI properties in the build specification.  This forces LabVIEW to recompile each VI during the build process, applying the higher compiler setting (and other settings) to the build's source files and dependencies.

0 Kudos
Message 6 of 8
(3,425 Views)

Thanks for reply, I think debugging on VIs is enabled by default so all good there.

For dependencies I can simply set this flag in build spec as follows?:

 

pawhan11_0-1587408730870.png

 

 

 

So according to this doc, building app does not actually recompile all source code? 

The deeper I go the more confusing it gets.

0 Kudos
Message 7 of 8
(3,419 Views)

Correct, setting the build specification properties to debugging DISABLED and the individual VI property to debugging ENABLED (default setting) forces a recompile during building.  The forced recompile is beneficial only if the compiler optimization setting has been increased.  This option can be manually set beforehand in LabVIEW options or can be incorporated into the build specification by creating a "PRE-build action VI" that uses scripting nodes to programmatically alter the compiler optimization setting (set to 10, highest).  A "POST-build action VI" can be used to return this setting to 5, which is the default.

0 Kudos
Message 8 of 8
(3,406 Views)