10-20-2009 09:31 PM
I am working on a VI (with about a hundred sub-VIs) written by someone else (who is no longer available to answer questions about it). I've done only a few minor updates, but when I re-compiled it, the resulting EXE ran several times slower than the original. As an experiment, I unticked the "Disconnect type definitions and remove polymorphic VI instances" checkbox in the compile options, and this resulted in a much faster EXE. I could post the VIs, but I would bet that most folks here don't have the time to look through it (programming style is very "spaghetti code"-ish). For what it is worth, the main VI consists of a couple of one-time code blocks and two large While loops (one for number crunching and the other for GPIB instrument control). Also, the various VIs use a LOT of locals, arrays, text files, property nodes and invoke nodes.
Any ideas on what to look for? The program runs fine in the development environment (run on the same PC as the EXE).
Regards,
Michael Tracy
Synergy Microwave
10-21-2009 12:45 AM
I suggest you to contact your local NI since you are ready to post your code & said that it has about a hundred SubVIs. They should be able to tell you the exact reason for the slowness of the EXE. It is better to approach NI since your IDE is LV 7.1, which is quite a bit older version.
SynergyMike wrote:
I could post the VIs, but I would bet that most folks here don't have the time to look through it (programming style is very "spaghetti code"-ish).
10-21-2009 12:59 PM
I suppose I should have mentioned that I know 7.1 is obsolete and that NI no longer supports it (that's why I post questions here, hoping some folks out there still use it or perhaps remember encountering similar problems). Unfortunately, there is no budget here for either upgrades or training (everything I've learned about LV has been via using it and reading the available documentation, plus this forum).
Regards,
Michael
10-21-2009 01:09 PM
The only thing that option should do for you is to replace the type defs with equivelent non-typed version and toss all of the polymorphic versions that are not used.
So if I focus on the replacing type defs part...
That process may have resulted in the defaults of your controls be lost so if any of your typedef'd controls have a large or bogus default value, then not removing them MAY preserve the default data. If the replaced version have empty default data then they may be able to run more efficiently.
Yes all of that is wild specualtion!
So you could check your code for non-empty default data...
Just trying to help,
Ben
10-21-2009 08:44 PM
Thanks, Ben! (Yes, I do realize the difficulty of the question) I'll let you know what I find with some digging along those lines.
Regards,
Michael