Bug 1091 - Album -> Songs much slower through web interface than on squeezebox
: Album -> Songs much slower through web interface than on squeezebox
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Database
: 6.0.0
: PC RedHat Linux
: P2 normal (vote)
: ---
Assigned To: Dan Sully
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-03-14 17:51 UTC by Nicolas Mizel
Modified: 2008-08-18 10:53 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 Nicolas Mizel 2005-03-14 17:51:12 UTC
SlimServer Version: 6.0b1 - r2461 / slimserver-2005_03_14-1.noarch.rpm

The following query/click (Browse Artists / U2 / Achtung Baby) on the web 
interface locks my cpu for about 1.5 secs, leading to a dropout when playing 
flac. This is the sql query I have in the log:

2005-03-15 02:19:27.6150 Running SQL query: [SELECT DISTINCT tracks.id AS 
id,tracks.thumb AS thumb,tracks.age AS age,tracks.ct AS ct,tracks.titlesort AS 
titlesort,tracks.album AS album,tracks.tracknum AS tracknum,tracks.url AS 
url,tracks.tag AS tag,tracks.title AS title,tracks.disc AS disc,tracks.fs AS fs 
FROM contributor_track, tracks, contributors, albums WHERE 
contributor_track.track = tracks.id AND contributors.id = 
contributor_track.contributor AND albums.id = tracks.album  AND ( 
contributor_track.contributor = ? AND tracks.album = ? ) ORDER BY tracks.disc, 
tracks.tracknum, tracks.titlesort]
2005-03-15 02:19:27.6165 Bind arguments: [293, 511]

When doing the same through the Squeezebox (Browse Music -> Browse Artists -> 
U2 -> Achtung Baby) everything is lightning fast. The query is then:

2005-03-15 02:20:25.6944 Running SQL query: [SELECT DISTINCT tracks.id AS 
id,tracks.thumb AS thumb,tracks.age AS age,tracks.ct AS ct,tracks.titlesort AS 
titlesort,tracks.album AS album,tracks.tracknum AS tracknum,tracks.url AS 
url,tracks.tag AS tag,tracks.title AS title,tracks.disc AS disc,tracks.fs AS fs 
FROM contributor_track, tracks, contributors, albums WHERE 
contributor_track.track = tracks.id AND contributors.id = 
contributor_track.contributor AND albums.id = tracks.album  AND ( 
contributor_track.contributor = ? AND contributor_track.role = ? AND 
tracks.album = ? ) ORDER BY tracks.disc, tracks.tracknum, tracks.titlesort]
2005-03-15 02:20:25.6970 Bind arguments: [293, 1, 511]

I find the overall speed of the system (search, browse) way faster in 
SlimServer 6.0 than 5.4.1, but strangely the web client much slower.
Comment 1 Dan Sully 2005-03-14 19:41:39 UTC
I'll take a look.
Comment 2 Nicolas Mizel 2005-03-15 12:50:49 UTC
SlimServer Version: 6.0b1 - r2461

Actually "opening" an Album from the web interface is so slow (more than 1.5 
sec with player stopped!) that I always get dropouts when playing flac files. 
Going back to 5.4...

Comment 3 Dan Sully 2005-03-15 13:04:51 UTC
Could you send me your slimserversql.db file?

Thanks.
Comment 4 Dan Sully 2005-03-15 15:08:57 UTC
Nicolas - I took a look at these queries, and at your database. There doesn't
seem to be anything wrong here..

I did just check in a small optimization that was causing an extra query to
happen for most of the web pages when it wasn't needed.

Could you try syncing your subversion tree and see if that helps?

Thanks.
Comment 5 Nicolas Mizel 2005-03-15 17:29:44 UTC
Dan,

Thanks a lot for this quick fix. I synced with revision 2513 and the problem 
almost vanished. The Album -> Songs query speed has improved noticeably but is 
still slower than on 5.4. The dropouts issue has gone except when querying 
Albums with many (more than ~15) songs.
Comment 6 Dan Sully 2005-03-15 17:51:13 UTC
Great. I'm afraid I'm going to have to say for anything else that upgrading your
machine will help..

Closing this bug.