2014-06-17, 12:20
(2014-06-16, 06:20)MilhouseVH Wrote: And while 0.3% CPU per thread isn't a great deal, when there are multiple LanguageInvoker threads all using 0.3% CPU its an amount that adds up on low powered devices. Sure, even 1-2% of wasted CPU isn't a great deal, but it's 1-2% (or more, depending on the number of addons) that doesn't need to be wasted if there existed a "better" xbmc.sleep() mechanism. Of course, getting developers to adopt the new, improved sleep mechanism is likely to be an uphill struggle assuming addon code changes are necessary.
The reason I've been looking into this is because I wanted to write yet another addon that would end up sleeping most of the time, but I've decided against writing it rather than add to the ever growing list of addons that waste CPU time while "sleeping".
Wow. are you serious? All this fuzz for 0.3%, by the way these 'percent cpu usage' tests have why higher margin of error than that. Also, if you'd look at the implementation of xbmc.sleep you'd see it sleeps in 100ms intervals regardless. Talk about premature optimization.