View Single Post
  #5   Spotlight this post!  
Unread 29-03-2013, 10:14
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: LabVIEW: Takes way to long to run Robot Main

Bugs. Pesky corner case bugs.

More specifically, a few years ago the compiler was rewritten to include more passes and more optimizations. It now uses LLVM from Urbana Champaign for backend code creation. Great stuff except that the compile became about ten times slower than it was previously.

In response, they created a caching mechanism that looks at code signatures and attempts to reuse previous object code stored in a database. Bugs in this approach come in two forms. If you use the cache when you should have recompiled, then the code is wrong, may crash, or may give the wrong answer. If you recompile when you could have used the cache, you get the right answer and operate correctly, but take much longer to build. The owners of this code have to be pretty careful not to have bugs in category 1 and have inadvertently introduced bugs in category 2 due to insufficient tests.

I also wish we'd heard of or found these earlier. The best we can do now is to publicize the best practices, apologize, and wait for an improved edition. These particular issues are already resolved in the codebase for LV 2013 which is in beta testing and due to be released later this year.

Feel free to tell other LV teams of the best practices. Many teams don't go to CD or the NI or FIRST forums and may not hear of this.

Greg McKaskle
Reply With Quote