Roomba980-Python icon indicating copy to clipboard operation
Roomba980-Python copied to clipboard

Performance Optimisations

Open HolgerHees opened this issue 6 years ago • 1 comments

Hello,

I run your program on a low power Celeron J4105 powered board and it is running with ~50% CPU utilization if the roomba is active.

Now I tried to optimize it a little bit.

  1. I disabled the storage of the lines.png and the problems.png. I use it as a in memory only image.
  2. I apply the problems.png only if there are problems.
  3. I disabled the map.png because I use the map_notext.png only. I will make this configureable

as a result, the utilization is going down from 50-60% to 18-20%.

Is there any reason why you are storing the lines.png and the problems.png on the harddisk?

Later I can also provide a pull request.

HolgerHees avatar Mar 13 '18 11:03 HolgerHees

No real reason, but I have a SSD and a fairly powerful server, so I didnt really notice (OpenCV processing uses a fair amount of processing power though).

Actually maybe it was so that you could stop and start the program without loosing the lines drawn so far. Maybe just write the lines on exit, or in Debug mode would do the same.

CPU usage optimization would be welcome.

NickWaterton avatar Apr 21 '18 03:04 NickWaterton