Quote:
|
For instance whenever we build the project and run as startup it takes only a few seconds to deploy but loading debug code to the robot takes roughly ten minutes (when running robot main). Why is there such a difference between these two methods of deploying the same code? Is there anyway to make deploying faster?
|
The extra functionality associated with debugging adds a LOT of overhead to the system. By the way, I learned something useful this passed weekend related to debug mode. Labview updates indicators on all front panels that are open. So if you're deep into development and you've got a ton of VIs open (even if they're minimized), the debugger will be wasting a lot of extra time updating indicators on front panels that you don't even care about.
Quote:
|
I also noticed that when we run robot main to deploy the code in debug mode every vi.lib is deploying as well. Why do all these need to deploy as well if they're not changing? Is it so I can debug them the same way I debug the code we wrote? Can I choose to not debug them and make the code deploy faster?
|
The first time you run in debug mode, all of the code is loaded into volatile RAM (which takes several minutes). If you click on "Finish" in Robot Main and then click "Run" again, it should detect which VIs are already loaded and not re-deploy them. When that happens, it deploys in a matter of seconds. Is that not working correctly for you? Keep in mind, if the cRIO is rebooted or loses power, everything in volatile RAM is lost.
Quote:
|
When we build the code before running as start up how much compiler optimization is actually happening? Will any of these optimizations (if there are any) ever produce a noticeable difference in how the code runs?
|
A good optimizer should not change the effect of your code one iota. It should only make changes that speed up execution without changing any functionality at all. If the optimizer DOES change something, that's a bug.
Quote:
|
When we deploy code in debug mode we always run robot main and deploy everything. If I just wanted to deploy a few .vis could I just run them? What kind of problems might I encounter? I know there is an easy way to test this but I haven't had an opportunity since I had the question.
|
In typical Labview development, yes, you could run just the VI you're in. But the FRC Labview code has a lot of interdependencies between VIs and I doubt very many VIs could run completely on their own without causing lots of confusion and errors. It's probably depends on which VI you're talking about.