LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Speeding up build times

What can I do to speed up build and debug times on my programs? Right now, the program I'm working on takes 45ish seconds to complete the build and execute steps.

I'm using a workspace with multiple projects present at once. Only one project gets compiled. I've noticed, though, that the generated build.ini lists a bunch of include files in the [Included Headers] section. (123 to be exact.) Could this be slowing down the build steps?
0 Kudos
Message 1 of 7
(3,827 Views)

Hello IBNobody,

Do you get the same slow build time when you create a release executable?  Also, you mentioned that it takes 45 seconds to build and execute.  Does this mean that it takes that long for CVI to display your user interface?  In the build.ini file, you should only see include file references for those files/libraries you include at the top of your source file.  Do you see any extraneous entries, or those that refer to the other projects in your workspace?

Thanks.

Wendy L
LabWindows/CVI Developer Newsletter
0 Kudos
Message 2 of 7
(3,806 Views)
45 seconds was incorrect. It just seemed like a long time.

Creating a release executable and running it takes 10 seconds.

Creating a debuggable version takes 15 seconds for the program to reach the first statement in MAIN.
>>In the build.ini file, you should only see include file references for those files/libraries you include at the top of your source file.  Do you see any extraneous entries, or those that refer to the other projects in your workspace?<<

Yes. See below.

---------------- BUILD.INI SNIPPIT ----------------

[Included Headers]
Header 0040 = "/c/Shark_Software/30004-1 SK3/_Engine_Setup.h"
Header 0041 = "/c/Shark_Software/30004-1 SK3/_Shark_Channels.h"
Header 0001 = "/c/Shark_Software/_Base Code/BASE FILES/SHARK_ENGINE.h"
Header 0033 = "/c/Shark_Software/_Base Code/BASE FILES/SHARK_UIR.h"
Header 0100 = "/c/Shark_Software/30036 SSI/_Engine_Setup.h"
Header 0101 = "/c/Shark_Software/30036 SSI/_Shark_Channels.h"
Header 0042 = "/c/Shark_Software/30038-1 CTI/_Engine_Setup.h"
Header 0043 = "/c/Shark_Software/30038-1 CTI/_Shark_Channels.h"
Header 0114 = "/c/Shark_Software/30102 ACI/RevD/_Engine_Setup.h"
Header 0115 = "/c/Shark_Software/30102 ACI/RevD/_Shark_Channels.h"
.
.  (More of the same as above...)
.
Header 0002 = "/c/Program Files/National Instruments/CVI71/include/ansi_c.h"
Header 0003 = "/c/Program Files/National Instruments/CVI71/include/ansi/assert.h"
Header 0004 = "/c/Program Files/National Instruments/CVI71/include/cvidef.h"
Header 0005 = "/c/Program Files/National Instruments/CVI71/include/cvirte.h"
Header 0006 = "/c/Program Files/National Instruments/CVI71/include/ansi/ctype.h"
Header 0007 = "/c/Program Files/National Instruments/CVI71/include/ansi/errno.h"
Header 0008 = "/c/Program Files/National Instruments/CVI71/include/ansi/float.h"
Header 0009 = "/c/Program Files/National Instruments/CVI71/include/ansi/limits.h"
Header 0010 = "/c/Program Files/National Instruments/CVI71/include/ansi/locale.h"
Header 0011 = "/c/Program Files/National Instruments/CVI71/include/ansi/math.h"
Header 0012 = "/c/Program Files/National Instruments/CVI71/include/mbsupp.h"
Header 0013 = "/c/Program Files/National Instruments/CVI71/include/ansi/setjmp.h"
Header 0014 = "/c/Program Files/National Instruments/CVI71/include/ansi/signal.h"
Header 0015 = "/c/Program Files/National Instruments/CVI71/include/ansi/stdarg.h"
Header 0016 = "/c/Program Files/National Instruments/CVI71/include/ansi/stddef.h"
Header 0017 = "/c/Program Files/National Instruments/CVI71/include/ansi/stdio.h"
Header 0018 = "/c/Program Files/National Instruments/CVI71/include/ansi/stdlib.h"
Header 0019 = "/c/Program Files/National Instruments/CVI71/include/stdlibex.h"
Header 0020 = "/c/Program Files/National Instruments/CVI71/include/ansi/string.h"
Header 0021 = "/c/Program Files/National Instruments/CVI71/include/ansi/time.h"
Header 0022 = "/c/Program Files/National Instruments/CVI71/include/utility.h"
Header 0023 = "/c/Program Files/National Instruments/CVI71/include/userint.h"
Header 0024 = "/c/Program Files/National Instruments/CVI71/include/gpib.h"
Header 0025 = "/c/Program Files/National Instruments/CVI71/include/formatio.h"
Header 0026 = "/c/Program Files/National Instruments/CVI71/include/dataacq.h"
Header 0027 = "/c/Program Files/National Instruments/CVI71/include/nidaqerr.h"
Header 0028 = "/c/Program Files/National Instruments/CVI71/include/olderror.h"
Header 0029 = "/c/Program Files/National Instruments/CVI71/include/nidaqcns.h"
Header 0030 = "/c/Program Files/National Instruments/CVI71/include/regdefs.h"
Header 0031 = "/c/Program Files/National Instruments/CVI71/toolslib/toolbox/inifile.h"
Header 0032 = "/c/Program Files/National Instruments/CVI71/toolslib/toolbox/toolbox.h"
Header 0034 = "/c/Program Files/National Instruments/CVI71/include/NIDAQmx.h"
Max Header Number = 117

--- END SNIPPIT ---

My project doesn't even use "c:\Shark_Software/30004-1 SK3/_Engine_Setup.h". It uses its own "_Engine_Setup.h" file that is located in the current active project.

- Nobody
0 Kudos
Message 3 of 7
(3,794 Views)

Hello IBNobody,

What I would suggest is for you to create a new workspace and project.  The add all the necessary files to the new project and workspace.  Then recompile the project and see if the build and execution times improve and also if the reference to the Shark_Software header files go away.

Thanks.

Wendy L
LabWindows/CVI Developer Newsletter
0 Kudos
Message 4 of 7
(3,784 Views)
Is there any other way to get CVI to not include the header files? I have roughly 30 individual projects, and it would make things difficult to have 30 individual workspaces for each project.

0 Kudos
Message 5 of 7
(3,780 Views)
Hello IBNobody,
 
Say for instance, we have project 1 and project 2 included in our workspace.  I do see the behavior that the build ini file for project 1 will have references to the include files in both project 1 and project 2, and vice versa.  For test purposes, If you add your project to a new workspace without the other projects, then compile and run your project in this new workspace, do you see an increase in build time?
 
Thanks.
Wendy L
LabWindows/CVI Developer Newsletter
0 Kudos
Message 6 of 7
(3,758 Views)
Wendy,

I figured out why my build times were so slow for these projects. I'm using DAQmx, and the libraries have a negative speed impact on compile/execution times. (I'm running everything on an old 800 MHz monster.)

- Nobody
0 Kudos
Message 7 of 7
(3,701 Views)