Posts: 395
Joined: Oct 2009
Reputation:
0
Hi.
Just like the topic says XBMC freezes for about 4 minutes when request a large music Library over http api.
//Cheers StarChild
XBMC r23858
Windows 7 64bit
Posts: 26,215
Joined: Oct 2003
Reputation:
187
Do the identical query in any other sqlite browser (eg sqlitespy) and see how long it takes.
Posts: 395
Joined: Oct 2009
Reputation:
0
SELECT a.idAlbum, a.strAlbum, i.strArtist, a.iYear, ( SELECT p.strPath FROM song AS s, path AS p WHERE s.idPath = p.idPath AND s.idAlbum = a.idAlbum LIMIT 1 ) FROM album AS a, artist AS i WHERE a.idArtist = i.idArtist ORDER BY i.strArtist ASC :
13698 rows fetched (280,51 sec)
Posts: 26,215
Joined: Oct 2003
Reputation:
187
There ya go then. Nothing much we can do about it if it takes 4 minutes to execute, huh?
I'm sure you can optimize your query significantly.
Cheers,
Jonathan
Posts: 395
Joined: Oct 2009
Reputation:
0
But XBMC shouldn't freeze, while it does this?
Posts: 26,215
Joined: Oct 2003
Reputation:
187
That's the way it works. For very good reasons, all HTTPAPI calls are processed in the main thread, as they often affect things that need to maintain state for rendering and other access.
A patch to rip out the HTTPAPI and replace it with something a little more sane would be welcome.
Cheers,
Jonathan
Posts: 395
Joined: Oct 2009
Reputation:
0
Ok, thank you for your time.
About the patch i wish i could help more.
//Best regards StarChild