2009-10-10, 17:44
I think the high CPU usage on idle is an issue of the way XBMC is implemented.
Here is my theory:
Normal programs (like notepad) are so called event-driven. That means normally they wait until the OS sends the application an event (key-press, mouseclick, etc). It then processes that event and waits for the next event.
This is why notepad doesn't utilize any CPU when idle, it just waits until something happens.
XBMC in contrast has a active running Execution-Loop. It actively paints/displays the GUI according to the skin, checks whether the mouse has been moved or any key as been pressed, etc and then loops and paints the next frame.
Because as soon as all work for one frame is done XBMC starts over rendering the next frame and there isn't any waiting involved. That is why you get higher frame rates on faster machines.
But having high frame rates also comes with price of high CPU utilization.
This is not a bug!
I think when you turn on wait for VBlank option, this introduces some waiting into the loop. The system is then instructed to wait until the display device has finished drawing the display of one frame.
In my XBMC installation I noticed high CPU utilization when playing audio. In the settings you can limit the frame-rate for visualization. Setting this to 25 greatly reduced CPU utilization when playing audio and using visualization.
I don't know whether there is an option to limit the frame rate for the menus?
This may reduce CPU utilization.
Bernd
Here is my theory:
Normal programs (like notepad) are so called event-driven. That means normally they wait until the OS sends the application an event (key-press, mouseclick, etc). It then processes that event and waits for the next event.
This is why notepad doesn't utilize any CPU when idle, it just waits until something happens.
XBMC in contrast has a active running Execution-Loop. It actively paints/displays the GUI according to the skin, checks whether the mouse has been moved or any key as been pressed, etc and then loops and paints the next frame.
Because as soon as all work for one frame is done XBMC starts over rendering the next frame and there isn't any waiting involved. That is why you get higher frame rates on faster machines.
But having high frame rates also comes with price of high CPU utilization.
This is not a bug!
I think when you turn on wait for VBlank option, this introduces some waiting into the loop. The system is then instructed to wait until the display device has finished drawing the display of one frame.
In my XBMC installation I noticed high CPU utilization when playing audio. In the settings you can limit the frame-rate for visualization. Setting this to 25 greatly reduced CPU utilization when playing audio and using visualization.
I don't know whether there is an option to limit the frame rate for the menus?
This may reduce CPU utilization.
Bernd