[mythtv] patch: setsetting -> db

Isaac Richards ijr at po.cwru.edu
Mon Feb 24 20:31:13 EST 2003

On Monday 24 February 2003 07:42 pm, Andy Davidoff wrote:
> Which is why I wanted the changes to the playlist to only happen only once
> per selection or de-selection of tracks, during playlist creation.  This
> would mean that one would never update the playlist in the database except
> to add or remove a track/album/artist to the playlist.  There would be no
> SaveDefaultPlaylist() because it would be crafted incrementally elsewhere.

Yes, since the 4 additional milliseconds (or even up to 80ms when using your 
patch) it takes on exit to save is completely unacceptable.

> You've said that it takes your mythmusic 1/10th of a second to save/load a
> playlist, but I've heard several complaints now that the slowdown is in
> editing a playlist.  Even with my limited music collection, it takes a
> couple seconds.  I believe this is disk I/O and unrelated to the DB, though
> it is clearly querying the database once for each entry in the playlist
> and perhaps even each entry in the musicmetadata table.  I don't see why
> it can't issue a single query for that data.

The slowdown is in generating the entire GUI tree of music data, and in doing 
a CD lookup if needed, not in loading/saving the playlist (since that doesn't 
even happen at the same time).  In my experience, hitting the CD takes much 
longer than the rest of the data lookups.

Things could be preloaded somewhat, but every track needs to be checked 
against the default playlist in order to properly mark upper level tree items 
as selected or not (ie, If every track in an album is in the playlist, then 
the album should be selected.  If every album by an artist is selected, the 
artist should be selected).  I need to make it a tri-state check someday, as 

Separate artist/album/track database tables would probably help quite a bit, 
as alternatively could pulling in all the information at once and parsing it 
in the program instead of at the SQL server.  It'd also make sense to only 
generate the tree once per execution and then just re-use and update it, but 
I haven't gotten that far into optimizing things, since turning off the auto 
CD lookup helps a _lot_ in terms of the speed of that dialog appearing.


More information about the mythtv-dev mailing list