Bug 2497 - Poor performance - Very slow to list tracks in an album or playlist
: Poor performance - Very slow to list tracks in an album or playlist
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Database
: 6.2.1
: PC Windows XP
: P2 normal (vote)
: ---
Assigned To: Dan Sully
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-11-05 06:25 UTC by Nigel Coxon
Modified: 2009-09-08 09:24 UTC (History)
0 users

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nigel Coxon 2005-11-05 06:25:04 UTC
I have been running Slimserver on a 5-6 yr old Toshiba Portege laptop for a 
while now, and have had very acceptable performance given its spec (Pentium II 
300 MHz, with 128Mb RAM, running Win 2000).
My library is 400 albums, 5275 tracks, 220 artists, mainly FLACs with some 
MP3s, sitting on an external USB drive connected to a NSLU "slug". The 
slimserversql.db file is 6.4Mb, and slim.exe uses approx 60 Mb memory. I'm 
using a wireless squeezebox 2. 

Response is a bit slow when I turn the SB on, but I think the disk may have 
gone to sleep. Apart from the occasional slow response to remote control 
input , the SB generally works well, sounds great, and the laptop is extremely 
quiet , so its left on all the time. Browsing through the web interface is 
slow, but tolerable, given the feeble spec of the laptop.  I am currently 
running 6.2b2 4694 on the Tosh.

Ive just taken delivery of a new desktop - a Dell 5150, 3Ghz with 2Gb Ram, 
running Win XP sp 2, so I thought Id see how it compared, expecting blistering 
performance.

I dowloaded the latest version of Slimserver, 6.2.1 5024, waited for the 
rescan, and then had a play on the web interface. Initial screens were much 
quicker as expected, but then big disappointment. Once a list of albums or 
playlists was up, it takes ages to list the tracks in the album or playlist - 
anything from 7 to 15 seconds!! Thats a long time on a 3Ghz PC!

Going back to the old Toshiba, I try the same thing - initially much slower to 
display the list of artists, and their albums, but its actually quicker to 
display the list of tracks, typically 4 to 8 seconds. At this stage I'm 
confused , an old laptop with a puny spec faster than a brand new machine with 
lots of RAM ???

I tried playing around with the database cache parameter, and this seemed to 
make a bit of a difference, reducing the track display time on the new PC to 3 
to 7 seconds, but that's still much slower than I expected.
 
I did more digging and I think I have found the cause (or some of it anyway). 
I turned on some debug (d_info as a very lucky first guess). Slimserver checks 
that each track in the album, or playlist exists and hasn't changed (size or 
timestamp). This is what takes the time - on my setup, going off to the NSLU 
and external disc, following the file path through 6 levels of folder to find 
the track, just to see if it has changed.
Is this expected behaviour?. At first glance, I wouldn't have thought it was.

I would much prefer that Slimserver listed what was in the database, rather 
than going off to the diskstore. If something has changed on the disc, I can 
manualy rescan, or rely on the overnight rescan. 

But then maybe there is a real need to do this.
Comment 1 KDF 2005-11-05 10:22:51 UTC
As a result of earlier versions, there was much ranting that new or changed
music was not immediately added to slimserver.  Some users really take offense
to being told they can do it manually.  I personally applaud your preference (I
hate too much automatic stuff too).  Dan mentiond in the forum that he will be
looking into improving performance, but I exepct there will always have to be
some sort of compromise to work with both ends of the scale.
Comment 2 Blackketter Dean 2005-11-06 20:33:35 UTC
Nigel: which screens are you seeing the slowness on?  Is this when browsing by artist, album, genre, tracks, or music folder?  
Comment 3 Nigel Coxon 2005-11-08 00:11:59 UTC
(In reply to comment #2)

Dean
The problem shows itself whenever I have a list of albums displayed, and I want to see the list of tracks in the album. It doesnt matter how I navigate to this position. Via Browse artists, select an artist=>displays a list of albums (quick), select an album=> displays a list of tracks (v slow)
Via browse albums, same problem. via browse genres, same problem, all with displaying the list of tracks.

Nigel
Comment 4 Dan Sully 2005-11-08 09:51:09 UTC
Nigel - this should be much improved in 6.5 as of the 2005-11-08 nightly, and the 6.2.1 branch as of 2005-12-08 (tonight's build).

Please let me know.

Thanks.
Comment 5 Nigel Coxon 2005-11-09 12:44:49 UTC
(In reply to comment #4)
> Dan
Ive just tried last nights 6.2.1 (V5107) on both my old slow laptop, and bright new desktop. Both run considerably faster. Well done & thanks

I did check the log with d_info debug set, and noticed that Check validity is still called once for each display. If I ask to see the tracks of 1 album, the validity of the first track is checked. If I ask to see all tracks from multiple albums, only the validity of the first track of the first album is checked. I was hoping it wouldnt go near the file store at all. Any ways, its a bit academic, 'cos the speed is much better

Bug fixed as far as I'm concerned
(this is my first bug report - is it down to me to change to Fixed?)
Nigel
Comment 6 Dan Sully 2005-11-09 13:00:33 UTC
Nigel - it still does that check to look for artwork.

If you don't want that - turn off 'Look for Artwork' in Settings->Performance