kershner / screenBloom

Fake Ambilight for Philips Hue via Python
http://www.screenbloom.com
329 stars 48 forks source link

CPU Load to high when using slow intervals #9

Closed popy2k14 closed 7 years ago

popy2k14 commented 8 years ago

I'll use ScreenBllom with one bulb and an interval of 1,2 s. In this configuration it uses ~10% of 2 cores cpu load. My Core i3-3220 @3,3Ghz gets too hot while running kodi & screenbloom at the same time. My fans are speeding up and are too noisy. Without screenbloom i does'nt have the issue.

Why does screenbloom using so much cpu when it has just to analyse the screen every 1,2 seconds?

I am running screenbloom on windows and the cmd windows is visible. The debug messages are updated every 30ms (ill see that in the debug messages).

Is it possible that screenbloom (capture) thread runs much faster than it updates the hue bulbs (set interval in config)?

Maybe thats the issue of the high cpu load?

Regarding the 3 opened issues i am back @kodis hue addon and theatre mode -> WAF factor is higher :-) If i'll could help you test, thats no problem!!

Keep up the good work! thx Tobias

kershner commented 8 years ago

Yeah I think there is something off with my new update loop. It needs an efficiency pass which I think will reveal and sort out issues like this. I'll investigate and hopefully solve it as soon as I have some time.

popy2k14 commented 8 years ago

Thx Tyler. Take your time.

Tobias

kershner commented 7 years ago

This issue has been addressed with the update buffer concept. A small (ms) sleep was required in between update loops or else the CPU could become overworked.