Random lag

At random points in time our program was found to skip frames. After some investigation 3 factors turned out to cause the lag:

  • Logging text to more than one file per frame. I.e. it’s not possible to do both profiling and value logging as we tended to do it before.
  • Not having a sleep() in CommunicatorThread when not using the serial port. This is because the loop in that thread otherwise consumes 100% CPU.
  • Running other programs on rt14 at the same time, even just the “top” program which shows a list of the running processes.

Comments are closed.