[mythtv-users] Hey all

Johannes Niess linux at johannes-niess.de
Mon Mar 1 12:46:40 EST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am Montag, 1. März 2004 16:13 schrieb Ed Benckert:
> I'm not sure if this is better suited for the developers list, but I'm a
> new user and have a question regarding MythMusic.
>
> When you start the play screen, and it says Please Wait... what the heck is
> it doing? I tried looking at the code and being a MythTv newbie, I'm not
> quite sure what it's doing... it looks like it's organizing playlists but
> from what I've seen of the code and the MySQL so far, that shouldnt take
> any time at all.
>
> Can someone who knows about this module enlighten me? I have 6 gigs of
> MP3's on a network drive that it has as a library, and whenever I enter the
> play music screen, or go back to it from editing a playlist, it takes a
> long time to return control to me, or start playing, etc. I can understand
> if it's processing lots of data, but I cant figure out what it might be
> doing (so that I can optimize it to do it better and faster)

Ed,

I suspect inefficient use/not use of mysql. My default playlist is just short 
of 600 entries, but it takes about 4 seconds on a P4 to parse the song list. 
Looking at the mythconverge database (table musicplaylist) I see that 
playlists are saved as a string with all the song ID's. I suspect it's 
mythmusics task to parse that. Maybe it even needs a seperate lookup _per 
song_ on the playlist. 

It should be doable in just one SQL query. IMHO database structure and SQL 
querries should use a proper "crossing table". Songs and playlists have a N:M 
relationship:

Song_id	playlist_id
1		1
1		2
2		1
3		1

That way mysql has the burden of figuring out playlists, but that is what 
databases are made for. The existing layout can't be accellerated by creating 
new indexes. On my hardware Mysql is capable of 1000 (simple) querries per 
second.

Happy hacking!

Johannes Nieß
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQFAQ3cwZ86b9aw2E+0RAmjfAKC3LIpyWDBv79cBoLIG++S57YP6sgCgrKYw
4TWraARO6mgaXOcQfKAfqrs=
=Qk1J
-----END PGP SIGNATURE-----


More information about the mythtv-users mailing list