From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
10-11-2022 11:16 AM
Hi. I have a simple VI that initializes a large list (80000 elements) of IMAQ Image references. This happens in 6 seconds in the dev environment but if I put the VI in a blank project and make it an executable it takes 116 seconds for the same operation. Do you have any idea why this might be happening? The VI is attached. Thanks in advance.
10-11-2022 11:41 AM
Are you counting the time it takes to load the runtime? In dev mode, it's already loaded.
10-11-2022 11:53 AM
The time the .exe takes to load is like 1 second. That doesn't seem to be the problem. I have a bigger project with lots of VIs that its .exe loads instantly (~1 sec) but when I add the initialization of the images (same for loop attached before) it takes an eternity. No matter if it start the initialization of the images at startup or when I command (say 5 mins after the program is loaded) it's always the same outcome: fast in Dev mode, slow in .exe.
10-11-2022 02:07 PM
I don't know why executing "IMAQ Create" in an EXE would be slower than in dev environment.
10-11-2022 03:08 PM
I don't know either. Yes, I've tried initializing less images and it's the same the labview file ends the task in 5-10% of the time that the .exe requires to finish. For example, 10000 img references take 0.203 s in dev mode and 1.966 in the .exe form (the time they take to run also scales with the amount of images)
I have LabVIEW 2021 64 bits. I haven't tried any other version. I was hoping this was something fixable. But I will take your advice of trying different LabVIEW versions. Although it would be messy and time consuming. Do you have a different version of LabVIEW? Could you please try it?
It's just running the attached file the way it is; and opening a blank project, dragging the file to the project (save the project somewhere).Open it up, go to Build Specifications / New / Application (.exe), go to the Source Files tab and selecting the only VI as Startup VI. Then click Build. This takes 2 mins or less. Sorry the previous explanation was meant for everyone in the discussion, in case someone doesn't know how to create a .exe.
Thanks,
Andy.
10-12-2022 03:31 AM
I have LabVIEW 2021 32-bit, but it doesn't have the Vision Development Module installed (the IMAQ functions are missing). I also have LabVIEW 2016 32-bit which does have the IMAQ functions. I opened the VI in LabVIEW 2021 and "Saved for previous" for LabVIEW 2016 (exact version: LabVIEW 2016 16.0 32-bit).
Below are the results I got when running the VI in LabVIEW 2016 dev environment and built as a LabVIEW 2016 32-bit EXE.
Number of images | Execution Time in Dev Env (seconds) | Execution Time in EXE (seconds)
1,000 | 2.135 | 0.171
2,000 | 4.174 | 0.652
3,000 | 6.373 | 1.423
4,000 | 8.634 | 2.465
10,000 | 23.871 | 15.248
Observations
Questions
Computer Specs
My computer is a Dell XPS 8930 desktop. It's generally pretty fast (specs below).