LCDd wakes up *much* more often than required, consuming CPU on my otherwise idle device.
Looking at an strace and the main.c code, the real killer is the 'process' loop, which wakes up 32 times/second when most of the time there is nothing to do.
I believe the right fix here is to move the select() call out of sock_poll_clients() and up to the main loop. Use the select timeout as the render timeout and remove the explicit process loop entirely. Increased responsiveness with decreased CPU wastage.
(The next step then would be to remove the frequent render timeout (8/second) considering that my 'machine is idle' LCD is only actually changing every second (to blink the clock) - but that will require more code reading)
Log in to post a comment.