Linux Python performance issues
#1
Hi,

I have performance issues with Python scripts on OpenELEC for several months now (actually since I started using it 7 month ago). I already did a bug report on the OpenELEC issue tracker which you can find here.

Quick summary:
The execution of listitem.setProperty('key', 'value') is very slow on my system (maybe also other commands but I don't know exactly). I did a test with a fresh install and ran my performance test script (creates a new listitem, sets a property 10000 times and displays the results) and thought is was fixed, however it was only fast when launched from the programs section and slow if launched from the home screen. The same thing happens with XBMCbuntu 12.2 and that's why I'm posting this also here.

Running times of the script posted above on a fresh install in Confluence:
Code:
From programs    : 0.05s
From home screen : 20-30s (varies, most of the time it's about 30s which is 600 times slower than it should be)

Cause:
The cause of this problems seems to have something to do with multi-core. I'm using an Intel Core i3-3225 (Ivy Bridge) with an ASRock H77M-ITX and if I have more than 1 core and/or Hyperthreading enabled, the execution of my test script and other scripts (e.g. tv show next aired) is slow. It's only fast if I have just 1 core enabled without HT.

This problem does not happen on my other machine with the previous generation Core i7 2600k so it must have something to do with the hardware combined with ubuntu / xbmc / python... I can't test on Windows or OS X for now which could rule out the OS as the problem.

Any clues? Maybe someone with an Ivy Bridge could run my script and post results (1. run from programs section, 2. run from the home screen).

Thanks
Image
Reply
#2
I have the same cpu, here are my results on ubuntu raring with xbmc gotham from the xvba-testing ppa

from programs: 0.02s on the first 3 runs(did not do more)
from homescreen: between 0,05 an 3s
- first 2 runs gave the worst result
- running it consecutively seems to speed it up considerably
Reply
#3
Thanks for the tests. Do you have speedstep etc. enabled? That would explain why first run is slightly slower. I did a test today with latest ubuntu and latest xbmc nightly, same results as with OE 3.1.3 and XBMCbuntu, actually it was rather worse because sometimes the script didn't finish at all.

Which mainboard do you use?
Image
Reply
#4
sure, speedstep enabled. Mobo is an Asus P8H77-I
skin is confluence btw.
Reply

Logout Mark Read Team Forum Stats Members Help
Python performance issues0