[mythtv] MythMusic database schema suggestion

Joseph A. Caputo jcaputo1 at comcast.net
Tue Jun 24 15:01:49 EDT 2003



> -----Original Message-----
> From: mythtv-dev-bounces at snowman.net
> [mailto:mythtv-dev-bounces at snowman.net]On Behalf Of thor
> Sent: Tuesday, June 24, 2003 10:14 AM
> To: Development of mythtv
> Subject: Re: [mythtv] MythMusic database schema suggestion
>
>
> On Tuesday 24 June 2003 02:39 pm, Brian Lalor wrote:
>
>
> > What's being stored in memory?  If I've got 10,000 songs (which
> I probably
> > do and my collection isn't that big in relative terms), does that mean
> > you're reading *10,000* records from the database into memory at startup
> > time?
>
>
> 	Yes.
>
>
>
> > Allow me to look at it from the point of view of the current (0.9.1)
> > "select music" screen.  Startup of the application should be
> > near-instantaneous.  Just draw the screen.  Then we go to the "select
> > music" screen.  No data's been loaded from the database because we don't
> > know what the user wants to do yet, and for the sake of argument no
> > playlist data is yet loaded.
>
> 	That's not the way ot works. At startup, the user's entire
> music tree is
> written into a memory structure. Playlists as well.
>
> 	Can't say I'm enthusiastic about the idea of dynamically
> building branches
> onto a music data tree every time the user presses an arrow key
> (and adding a
> DB/SQL hit to that).

I'd rather incur lots of small hits than have to maintain an entire
collection/playlist in memory all the time... actually, I'd guess that
keeping it in memory isn't the problem, but rather that the playlist editor
builds at Qt widget for each track in the database when it's first brought
up, instead of maintaining the list view dynamically.  Am I wrong (can't
look at the code right now)?  Currently, with my 30GB collection, if I'm
playing music and hit '3' ('Edit Playlist'), it takes an interminably long
time to bring up the playlist editor (this with my playlist == entire
collection).  Since each level of the tree is significantly smaller than the
entire tree (for any decent-sized collection), I'd think that even if you
had to hit the DB (or at least add new TreeList items) for each level
expansion, it'd be more tolerable than a long wait at startup.

Just my $.02; of course, this doesn't really relate to DB design but rather
application design.

-JAC



More information about the mythtv-dev mailing list