Bug 17890 - Performance issues depending what scanner module is run
: Performance issues depending what scanner module is run
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Scanner
: 7.7.2
: PC Other
: P2 normal (vote)
: 7.7.2
Assigned To: Andy Grundman
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-02-15 09:51 UTC by Michael Herger
Modified: 2012-03-12 13:40 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Herger 2012-02-15 09:51:13 UTC
Depending on how we run the scanner it has considerable performance hits. Eg. running the command line scanner against a folder could be almost twice as fast as running it using the prefs file, even if it has that single folder defined as well. The following tests were run on a MacBook Pro, against a folder with about 3k music files. Some example timings:

time perl scanner.pl --wipe /Users/mh/Music/
real	0m11.978s
user	0m10.261s
sys	0m1.372s

time perl scanner.pl --wipe --prefsdir=/Users/mh/Library/Application\ Support/Squeezebox/
real	0m20.675s
user	0m15.395s
sys	0m2.067s

I've run this test several times to make sure caching isn't an issue. The same behaviour was seen on a dual core Atom based Linux box.

Looking at the code it's clear these two methods use very different code. But still I'm wondering whether this performance difference is ok. By running from the command line we shouldn't see any of the scanner <-> server communication overhead either (server was stopped at the time of testing).
Comment 1 Michael Herger 2012-02-15 09:53:25 UTC
From server.prefs:

mediadirs:
- /Users/mh/Music
noGenreFilter: 0
Comment 2 SVN Bot 2012-03-12 13:40:32 UTC
 == Auto-comment from SVN commit #33891 to the slim repo by agrundman ==
 == http://svn.slimdevices.com/slim?view=revision&revision=33891 ==

Fixed bug 17890, remove the ability to pass scanner.pl a specific directory to scan. This is not supported by the new media directory and scanner code.