LWN.net Logo

XBMC comes to Android

XBMC comes to Android

Posted Jan 10, 2013 8:28 UTC (Thu) by scarabeus (subscriber, #87843)
Parent article: XBMC comes to Android

I suppose the battery drain comes in hand with the extensive cpu/gpu usage XBMC interface is doing. From what I observe even without playback the XBMC running on my htpc is right now eating 24% of one core (E450) for just sitting and displaying main menu (the same as is on first screenshot in this article).
And that I bet will be serious pita to get fixed properly.


(Log in to post comments)

XBMC comes to Android

Posted Jan 10, 2013 15:19 UTC (Thu) by jmspeex (subscriber, #51639) [Link]

I had the same problem (except it was more like 60% CPU) and I finally figured out it was just due to some useless text scrolling at the bottom of the screen. After I figured out how to disable it, I ended up with ~2-5% CPU when idle. Much more reasonable, even though I still find it silly that XBMC would require CPU time for doing nothing.

XBMC comes to Android

Posted Jan 10, 2013 20:14 UTC (Thu) by sbakker (subscriber, #58443) [Link]

Yeah, XBMC's main loop is horrific. I noticed a similar thing on my RPi. The program runs in a "game-loop", executing about 100 times/sec, even if there is no input, and nothing to update on the screen. On every loop iteration it performs non-blocking read attempts on all its inputs. (Hence, when I told XMBC that I wasn't using an infrared remote, its CPU usage dropped from 99% to 70%, since it was performing much fewer read attempts.)

There does not seem to be any plans to change this any time soon.

XBMC comes to Android

Posted Jan 10, 2013 20:18 UTC (Thu) by nix (subscriber, #2304) [Link]

Let me guess, at least one input is some hideous thing on which select() doesn't work?

XBMC comes to Android

Posted Jan 15, 2013 14:46 UTC (Tue) by charlieb (subscriber, #23340) [Link]

> Let me guess, at least one input is some hideous thing on which
> select() doesn't work?

That's one possibility. Another is that XBMC is ported from Windows by people who don't understand or don't care about linux.

XBMC comes to Android

Posted Jan 17, 2013 15:25 UTC (Thu) by oliv3r (guest, #86764) [Link]

Actually, both are true or neither.

XBMC is ported from ... the Xbox and the loop was designed in that way. The term 'game-loop' isn't far off.

They do want to change that, but it would require a major rewrite. I think while XBMC is amazing and it will grow to be more amazing too, it will require a full on rewrite to be more portable and less demanding on resources. Event driven and all that.

XBMC comes to Android

Posted Jan 18, 2013 6:38 UTC (Fri) by raven667 (subscriber, #5198) [Link]

Actually that is something amazing that is worth a mention, that an application designed to run on the original Xbox game console has been made to run not only on standard desktop systems but also Android. I think there may be a point to be made about the homogenization and standardization of computing, that our modern operating systems and hardware are similar enough that a program can be made to run in such different environments. Early computers were much more wild by comparison.

XBMC comes to Android

Posted Jan 18, 2013 7:54 UTC (Fri) by Fowl (subscriber, #65667) [Link]

I blame C.

XBMC comes to Android

Posted Jan 19, 2013 15:48 UTC (Sat) by nix (subscriber, #2304) [Link]

You can also blame Unix (and POSIX).

XBMC comes to Android

Posted Jan 19, 2013 18:04 UTC (Sat) by raven667 (subscriber, #5198) [Link]

Although the Xbox environment is not POSIX or Unix. In any event I was just caught momentarily in awe that anything works at all 8-)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds