View Single Post
  #6   Spotlight this post!  
Unread 22-04-2016, 07:20
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,748
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: Moderate Lag With Dashboard

Several of the tabs are Bound to network variables and update bidirectionally at 10Hz or whatever the rate that the client is run at. The first loop, however, runs at whatever rate you determine, and variables placed there, could run much faster or much slower depending on if the loop has a large delay or a large amount of work to do.

The next thing I'd do is to probe the i terminal of the first loop and see if it goes up by 10 per second, 1 per second, or seconds per increment. You can drop timers and be more precise, but this is usually a good start.

You may have lots of stuff running in the top loop and you may want to separate some of your network variables out. If you have a simple binding other tabs may make sense. Otherwise, you can keep them and move the expensive/slow stuff out of the top loop.

Greg McKaskle
Reply With Quote