LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Thoric

Force Recompile option in Mass Compile

Status: New

LabVIEW is awesome. But sometimes things don't go quite right, and when something isn't quite right somewhere (maybe a bad bit of binary) it would be great to be able to recompile your code. Mass Compile is great for upcompiling from older major versions, but will ignore VIs that are already compiled in the current version. What I'd like to see is a "Force Recompile" flag in Mass Compile to ensure all identified VIs are most definitely recompiled, especially useful when you call Mass Compile from the shortcut menu in Project view.

 

Yes, it could take some time, but less time than scripting it and you can use the time to make yourself a nice cup of hot British tea.

 

forcerecompile.png

Thoric (CLA, CLED, CTD and LabVIEW Champion)


25 Comments
Intaris
Proven Zealot

Aren't they recompiled anyway?  Does it really skip VIs compiled in the current version?

Thoric
Trusted Enthusiast
Mass Compile will look at the embedded VI version value for each VI it loads (which is essentially the major release number 2011, 2012, 2013 etc.), and if it matches the current compiler it will skip that VI. Therefore a mass compile of your project folder won't recompile every VI, just those that contain older version binary, or if the code requires a recompile for other identified changes (such as inplaceness etc.) Sometimes I genuinely want a full recompilation of literally everything in my Project. The existing method (CTRL+Shift Run Arrow) isn't going to pick up things such as dynamic VIs, which I use a lot.
Thoric (CLA, CLED, CTD and LabVIEW Champion)


fabric
Active Participant

For simplicity I think I'd prefer that the mass compile function *always* forced a recompile, but I'd settle for a checkbox.

kegghead
Member
If the behavior you're describing is true, I'm confused why a mass recompile of of one of our main applications takes about as long as a build. If the mass recompile isn't doing anything, what is it doing for the better half of an hour?
PNR
Member
Member
I agree with kegghead, the recompile takes huge amount of time even if the project has just been mass-compiled. In any case I would always expect mass-compile to actually compile all VIs and not ignore any of them. Maybe somebody from NI could clarify things?
Thoric
Trusted Enthusiast

@kegghead: I can't explain your particular case (what evidence do you have that a build is necessarily recompiling everything?) but if you mass compile code more than once, you'll notice that the second attempt is much faster. Usually because all the work was done the first time, and for the second mass compile there was nothing to do.

 

@PNR: I already have assurances from two NI R&D members that this is the case. I'll try to get them to chime in here.

Thoric (CLA, CLED, CTD and LabVIEW Champion)


fabric
Active Participant

...So likely most of the time goes to untangling the dependency graph. Most large projects have many small simple VIs. Opening each of these VIs and scanning through their callees is probably more time consuming than the actual compile part, unless the diagram is above a certain threshold of complexity.

Thoric
Trusted Enthusiast

Whilst waiting for NI to chip in, you can read this article on Mass Compile http://digital.ni.com/public.nsf/allkb/654877E62A97B72986256C95006F9B24

 

 It states quite clearly that Mass Compile simply "loads and closes the VIs", which allows LabVIEW to detect crosslinking errors etc., and only causes a recompilation of VIs that contain old binary for older releases of LabVIEW. It doesn't recompile everything.


In fact, at the bottom, it then has the CTRL+Shift+Run suggestion for "Force Recompile" - the same as I explain in my first comment above.

 

Thoric (CLA, CLED, CTD and LabVIEW Champion)


Thoric
Trusted Enthusiast

fabric said: "For simplicity I think I'd prefer that the mass compile function *always* forced a recompile, but I'd settle for a checkbox."

 

@fabric: Yes, I can see why you would like that, I but I suspect in the large majority of cases the methodology Mass Compile current adopts (to open and close all VIs) is perfectly adequate. To enforce a recompile in every case unnecessarily increases the Mass Compile operation time by quite a bit. I think it should be introduced as an optional flag.

Thoric (CLA, CLED, CTD and LabVIEW Champion)


PNR
Member
Member

Thanks Thoric for clarification. Also the link made things clear to me. In a sense the term "Mass Compile" is confusing if there is no actual compiling done... As this is decided by the algorithm, I would love to see an option to decide if I just want to relink & update, or actually relink, update & compile my VIs.