CPU usage high
Closed this issue · 6 comments
I run the tool I am a bit worried about the CPU consumption (it goes to more than 200% of my CPU). This can come from many reason and it migth be hard to fix (I guess the Opencv is very time consuming)
Anyway maybe one option could be to turn off the different window as soon as all the calibration is done by pressing a particular button. The processing would scan the image "silently" without displaying it, I don't know if it will reduce drastically the consumption but it can be a first trial.
Maybe also it can come from the high resolution of the webcam (in that case we can force the user to use the lowest resolution (where we can still see enough to recognize the lego)
Hey Arnaud, we just made a push to improve the CPU usage. If you don't draw, CPU usage reduces by 20%. We will be thinking in other options.
@agrignard We reduce CPU usage. We delete OpenCV and restructure some classes. I think its the most we can do. What do you think?
what about giving the possibility ones the settings are done to close some of the window that are not used anymore ? Maybe that can save some cpu?
The current version (despite the many optimization done) is still hard to use in the sense that it runs for few hours and then the computer crashes. It's not a very big computer but still it's descent macbook pro.
Have you try to run this script for a long period ?
mmm I think just for half an hour. I had saw that reduce the frameRate can help to reduce CPU usage, I am gonna try doing this. I will see at what time it crashes and if it still crushes with a lower frameRate because all the changes had help the lego reader to run faster.