[mythtv-commits] Ticket #1287: Performance and clean patches for mythmusic

MythTV mythtv at cvs.mythtv.org
Wed Feb 15 07:22:46 UTC 2006

#1287: Performance and clean patches for mythmusic
 Reporter:  eskil <myth at eskil.org>  |        Owner:  ijr
     Type:  patch                   |       Status:  new
 Priority:  minor                   |    Milestone:     
Component:  mythmusic               |      Version:     
 Severity:  medium                  |   Resolution:     
Comment (by eskil <myth at eskil.org>):

         Small cleanup to let AllMusic change it's sorting and resync
         the db. Needed by the perfmeasure patch.

         Code that measures performance when entering mythmusic, not
         part of the final patch, but submitted since it might be of

         Remove unnessecary QRegExp objects, this alone shaved off 1-2
         seconds of all the tests.

         Don't pass around the startdir since it's already set inside
         AllMusic. Some parts used the member variable, other took it
         as argument, now they all used the member variable.

         When loading metadata from the db, if artist/album/title is
         empty, set it to sensible value ("Unknown

         Fix Metadata/MusicNode comparison to use locale aware QString
         comparisions - is more correct for us folk with crazy
         alphabets (börkbörkbörk).

         This just fixes initialising playcount, mostly to shut
         valgrind up.

         AllMusic.intoTree and MusicNode.intoTree were essentially
         the same, so eliminate one (I picked AllMusic::intoTree for
         now). So make it build the tree directly in root_node, this
         also eliminates the need for top_nodes, so they also go out
         the window. This greatly simplifies the code.

         And now that the code is simpler, we can finally move tree
         building logic out of Metadata (areYouFinished, getField and
         the splitartist handling) and toss it all in a object whose
         responsibility is to only treebuilding. During treebuilding,
         various stuff is cached in memory, ie. with 29000 records,
         there's a ca. 18mb spike in memory usage, but it's freed after
         the tree is built.

         All of the above in one big hunking patch. This one was
         generated against svn revision 8960.

Ticket URL: <http://svn.mythtv.org/trac/ticket/1287>
MythTV <http://www.mythtv.org/>

More information about the mythtv-commits mailing list