[mythtv-commits] Ticket #665: MythMusic AllMusic::resync() speed increases

MythTV mythtv at cvs.mythtv.org
Wed Nov 16 00:04:52 EST 2005


#665: MythMusic AllMusic::resync() speed increases
-------------------------------+--------------------------------------------
 Reporter:  mythtv at hburch.com  |       Owner:  ijr
     Type:  enhancement        |      Status:  new
 Priority:  minor              |   Milestone:     
Component:  mythtv             |     Version:     
 Severity:  low                |  
-------------------------------+--------------------------------------------
This will include multiple, independent speed improvements, each attached
 as a patch.
 Speedups are based on a base time of 10.20 seconds on my machine, for a
 test set of 31,050 music files.  This is based on 27 copies (the original
 plus 26 artificial copies) of my real music collection.  Each artificial
 copy is the same as real music file with a capital letter prepended to the
 artist.  TreeLevels is set to "artist album title".

 mythmusic-speedup-cache.patch:  Improvement: 1.15 seconds
    changes computation of lastPlay{Min,Max} and playcount{Min,Max} to only
 grab the values once.  LastPlay() is the expensive call, but did both for
 consistency.

 mymthmusic-speedup-lastplay.patch: Improvement: 0.95 seconds (beyond
 previous patch)
    rather than converting LastPlay to a QDateTime, convert it directly
 into a double.

 mythmusic-speedup-buildtree.patch: Improvement: 2.36 seconds (independent)
    changes the tree-building procedure to be batch.  At each node, the
 list of Metadata to go into that node is divided into the subtrees into
 which it should go.  This patch greatly improves trees with large fan-
 outs.  With TreeLevels set to "splitartist artist album title", the fan-
 out is significantly lower, so this only saves 0.15 seconds.  This patch
 changes the much more code than the other two.

 The first two improve the metadata-building loop in resync().  The last
 one improves the buildTree procedure.  Applying all three patches reduces
 load time from 10.20 seconds to 5.89 seconds, a 42% decrease.  On music
 collections with higher fan-out, the improvement will be more dramatic.

 They are submitted as separate patches to simplify review.

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


More information about the mythtv-commits mailing list