[mythtv] mythmusic tree construction - can it be changed ?
Eskil Heyn Olsen
myth at eskil.org
Tue Oct 18 06:30:33 UTC 2005
Don't know who owns it, but can I rewrite it ?
two reasons:
1) it's slow, it looks like it's O(n^2). Even with the fix to use
QPtrList::sort instead of bubblesort (ticket#482) it still takes my box
>40 seconds to build the tree. From profiling and stuff I can see quite
a few places to make it faster.
2) not very extensible/flexible. While trying to finish up the
shoutcast/icecast in mythmusic and slowly getting started on iPod
support, I keep running into the problem that adding extra toplevel
objects to the tree and reusing the code that does the whole
"splitartist artist album" thing is just really hard.
So I basically want to refactor the whole thing into a faster
TreeStrategy class, with one subclass that can do the "splitartist
artist album" style tree construction from a set of Metadata objects and
one that can do "directory" style.
That way, I can reuse all this for both showing radiostreams and tracks
from iPods (or whatever the hell you want to plugin (if you write a
plugin for it)).
(and while I'm at it, mind if I completely redo how all_music and
all_playlists are passed around left and right ? I really don't want to
extend everyone to also take all_radios etc all_ipodtracks).
eskil
---
More information about the mythtv-dev
mailing list