I have a quite large application which I reworked a bit to have better code recently. Everything runs fine in the development environment. But after building an application the cpu usage goes to 100%! If executed in the development environment the cpu usage is most time lower than 5%.
I tried to remove as much code as possible. Now there's just some initializational stuff and an event structure left, which does nothing almost all the time. All things (updates of controls) which could use the cpu, I removed!
I don't know where to look now and what to test...
I have read about the the strict typdefs getting disconnected in a build. This could have negative effects on strict type def'd constants in the diagram that are used to "throttle" your code or configure it.
There is an INI files setting that shuts this down.
Another approach would use normal constants on the diagram that feed "bundle by name" nodes.
Ok, I added many typedefs (because changing a structure works out more nicely throughout all the VI using those structures), but none of them is strict...
Thanks for the hint.
Carsten
PS: I forgot to say that I use LV 7.0 still (German version).
Well that's still pretty difficult. I'll try to strip heren and there further...
What I really don't understand why the hack it does work OK in the development environment and just uses so much cpu time after being built as application.
Thanks for your help. I think I'll continue tomorrow.
This application does not use VISA by any chances, does it? I have seen lock issues when opening FP that have a VISA resource control on the FP. Just a guess.
What I usally do is if there is some while loop in there that is mainly for graphical purposes or somthing to just wait on an event, i throw a little 30ms wait time in there, usally helps quite a bt or else the cpu will run at full speed, and easily eat up 100% of an application.
First we did want to implement some user control. So I included the security UI of the DSC module. In my changes it wandered into a sub VI of the initilization process -- but as it activates the security features of a front panel, I suppose it should be located on the block diagram of the main VI! And that works. If I move it back to my main VI, all is OK. (Well I'll remove it as we don't need this feature anymore.)
So actually it was really the initilization code. And now I understand too, why it worked in the development system. I suppose that the dev system loads theses function and by that this VI doesn't have any impact.