2014-04-18, 09:13
An addon that is incredibly slow on RPi is TedTalk.
(2014-07-17, 16:26)isilver18 Wrote: It's a shame we haven't overcome this problem yet.
(2014-07-17, 16:50)evangelion Wrote: Just timed "George Takei: Why I love a country that betrayed me" (TedTalks) 5 seconds dead from click to play.I don't believe the delay problem, generally, is delay to start playing when you are already at the content you want. The problem is navigating there through a menu structure that is parsed very slowly.
(2014-07-19, 01:33)da-anda Wrote: if an addon is fast really depends on how it's coded and what it's doing in the background. Addons that are using official APIs (like JSON) should usually be fast, but addons that need to extract links from websites using regular expressions are very CPU intensive and thus slow on the PI
(2014-07-19, 13:12)DBMandrake Wrote: To some extent XBMC on Pi is just revealing how inefficiently coded and completely lacking in optimisation some code is these days - when you're testing on a quad core 2.4Ghz desktop class CPU (as many addon authors probably are) if you write inefficient code you might not even be aware of it because its "fast enough" for good user interaction on a big beefy processor, even if its orders of magnitude slower than it could be.
Some of the inefficiencies millhouse found were pretty horrifying - static patterns being recompiled thousands of times just to navigate one menu step for example. The mind boggles. While I'm sure there is still some room to optimise the python environment itself on the Pi it does seem like the biggest gains will only come from the individual addon authors optimising their code properly, perhaps with a bit of help from some best practices guidance.
So there probably isn't a magic bullet that would allow addons to run much faster on a future version of XBMC on Pi - its up to the addon developers to actually optimise their code, rather than just code until it functions.
(2014-07-21, 17:05)LehighBri Wrote: Agree 100%. I'm assuming in some cases addon devs may not know the best practices for certain things and thus code things inefficiently without knowing it.
One addon which I'd love to hear/see if it's optimized is XBMB3C (Mediabrowser addon). I use it all the time (as do many others), but it still takes 10-15 seconds to navigate through the menu and media on my pi (using Gotham 13.1). I know they recently switched over from using simplejson to json which definitely helps, but I'm wondering if there's anything further that can be done.
If anyone is interested to take a look and see, it'd be great to hear if there's any additional improvements that anyone might spot upon a quick glance at the code: https://github.com/MediaBrowser/MediaBrowser.XBMC
def remove_html_tags( data ):
p = re.compile(r'<.*?>')
return p.sub('', data)