LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What process do you use to strip unneeded VIs from your builds?

I've got a big legacy codebase, and building applications that reuse code means big big build times. What confuses me is the inclusion of VIs and entire classes that appear nowhere in the call chain of the Startup VI. There's not even dynamic dispatch used in some of these applications, so it's hard to understand why these inclusions are happening.

How do you slim down your binaries and build times? Refactoring into a bunch of libraries? Avoiding any and all dispatch? Something else?

0 Kudos
Message 1 of 6
(1,388 Views)

Anything in "Additional Exclusions" useful?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 6
(1,354 Views)

- Maintaining code sanitation throughout development. 😉

 

And in the case of code that I inherit or must maintain, generally at least a day or two to understand the interdependencies, clean up the project tree to contain related functions in related virtual folders (and adjust the disk layout accordingly), renaming VIs to a more consistent naming scheme and sometimes even create libraries to namespace related functions in their own "prefix" and make as many of the VIs as possible private.

 

And if there are classes, make those damn methods that nobody outside the class should have access to, private too, or at least protected. I hate it when one of the stronger reasons to use classes is not used properly or sometimes not at all.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 3 of 6
(1,313 Views)

I may be missing the point of your question, but...

 

When I inherit a project and I expect that a lot of the VIs aren't used I'll create a source distribution from the top-level VI and begin a new project from that.  Then I'll learn pretty quickly about dependencies I've missed.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

Message 4 of 6
(1,278 Views)

@yuwon44 wrote:

What confuses me is the inclusion of VIs and entire classes that appear nowhere in the call chain of the Startup VI.


That usually points to having large libraries and only using small portions of the code in the libraries.  But when built, the entire library is added into the executable.  Some options:

  • There is an option in the build specification to exclude unused code from libraries.  I tend to avoid this, but you could try it.
  • Examine the libraries and see if they could be broken down into more succinct libraries (ie, make more smaller libraries).  Make sure the library is more one specific job (ex: data logging).
  • Some will balk at this, but use Packed Project Libraries.  Have a project just for building these libraries into PPLs.  When your executable uses these, the libraries will not need to be built with the executable and build times will become a lot faster.  I had a build that went from 10 minutes to 10 seconds after turning my libraries into PPLs.  You do have to be more careful on the process and organization of the code, but they are quite useful.

GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 5 of 6
(1,267 Views)

@rolfk wrote:

And in the case of code that I inherit or must maintain, generally at least a day or two to understand the interdependencies, clean up the project tree to contain related functions in related virtual folders (and adjust the disk layout accordingly), renaming VIs to a more consistent naming scheme and sometimes even create libraries to namespace related functions in their own "prefix" and make as many of the VIs as possible private.


I tend to ask for a week.  Granted, the size of the code base is a factor as well.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 6
(1,266 Views)