Slow scanning of music directories

Big O illogical1 at gmail.com
Sun Dec 14 05:29:24 CET 2008


For a while now I've been sitting on this bug, actually I started  
noticing it ever since we switched over to using mysql-embedded.
I have a 25 Gb ~/Music directory in OS X (there is an additional 10 GB  
in /Volumes). The issue is scanning this ~/Music directory became  
painfully slow after switching to mysqle. It seems as if it was even  
slower than with sqlite.
I just moved a directory and the update collection scan took at least  
five minutes to update that 25 GB collection. I say at least five  
minutes because I only noticed after the fan on my laptop got noisy  
because Amarok's CPU usage was > 100% (amarokcollectionscanner itself  
was using around 16% consistently).
This means it took > five minutes (7-8 perhaps) to update a collection  
whenever new music lands in the watch path. This is, all kinds of  
unacceptable, primarily because of the CPU usage involved; also  
because this isn't even all of my music yet. Does anyone have any idea  
of what's going on and whether or not this is "normal".

To re-iterate my problem is, for the amount of CPU resources being  
used, scanning takes too long. If amarok is going to be using up both  
my cores (CoreDuo 1.8 ghz) this should be done in under a minute no?  
Is this comparable with what goes on under linux?

I've just added my /Volumes/... directory to the collection (now 35  
GB) and a full scan took _15_ minutes. Debugging was not enabled when  
compiling so that's not the cause of slowness. Interestingly,  
amarokcollectionscanner disappeared from my process list around minute  
11 but the collection scan finished 4 minutes later anyway. huh?

See attached image for amarok cpu/memory usage in this last scan. Only  
things i did prior to scanning were, opening amarok and clicking  
around in the collection pane (to get /Volumes to show). It's also  
interesting to note that Amarok is using up more memory than  
kernel_task but that's another matter :-)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Picture 4.png
Type: image/png
Size: 157790 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/amarok-devel/attachments/20081213/9e95e69b/attachment-0001.png 
-------------- next part --------------


== Separate issue ==
Some people get a collection scan than never finishes when the first  
launch Amarok on OS X. Is it possible that amarokcollectionscanner  
crashes before the scanning job finishes causing this. 


More information about the Amarok-devel mailing list