Enabling LabVIEW Legacy Compiler in LabVIEW 2020 and Later

Updated Sep 15, 2023

Reported In

Software

  • LabVIEW

Issue Details

I have a large project with high code complexity. Whenever I change a small thing in the code, it needs to recompile and the compilation takes a long time, it needs to recompile. In LabVIEW 2018 and prior versions, I was able to force LabVIEW to use the legacy compiler by adding the EnableLegacyCompiler=True line to the LabVIEW ini file, ensuring faster compilation. That does not seem to work in LabVIEW 2020. How can we use the old compiler in newer LabVIEW versions?

Solution

The ini token EnableLegacyCompiler=True, is not an an officially implemented solution. Rather, it was a workaround. The support for legacy compiler was removed altogether from LabVIEW 2020 and forward. You no longer can force LabVIEW use the old compiler, as it is not in new LabVIEW versions anymore.

Additional Information

Slower compilation, is a direct result of optimizations that are being performed during compilation with new LabVIEW compiler. The higher the code complexity, the longer the time it takes to compile the code. For faster compilation you need to optimize your code to achieve low complexity. For example, you can divide your VIs into subVIs. This approach yields a responsive editor, optimized execution speed, and maintainable, readable code. In general, it is recommended to follow LabVIEW Best Practices when creating an application, to get lower code complexity.