Bug 1040 - creating and playing large playlists much slower than v5.4.1
: creating and playing large playlists much slower than v5.4.1
Status: RESOLVED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Playlists
: 6.0.0
: All All
: P1 blocker (vote)
: ---
Assigned To: Dan Sully
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-03-11 08:02 UTC by Jason Holtzapple
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 Jason Holtzapple 2005-03-11 08:02:25 UTC
For example, pressing play (unshuffled) on my Classical genre (943 albums with
3973 songs by 97 artists):

5.4.1 = 10 seconds wallclock
6.0b  = 210 seconds wallclock

both servers have completed initial scan and are otherwise idle before playback.

I know there are folks with much large collections than I. This performance
might be a big dissatisfier with the 6.0 release unless there's some improvement.
Comment 1 Dan Sully 2005-03-11 09:04:35 UTC
Jason - what type of server are you running on? CPU, RAM, etc?

Can you run with --d_sql and send the output from pressing play?

5.4 stores *everything* in memory, so that's why it's much faster. 6.0 needs to
retrieve from the database, but it shouldn't be that slow.
Comment 2 Jason Holtzapple 2005-03-11 10:07:28 UTC
I had been trying first on my dedicated music server. Via C3 800 Mhz CPU, 512 MB
RAM, NetBSD 1.6 and perl 5.8.6. When trying to play all Classical genre, the
server chewed away for over 10 minutes and didn't respond to any kill signals
(except 9). I then tried on my SunBlade 2000 because it is a bit easier to debug
these problems under Solaris. It is a running 2x1.2 GHz UltraSparc3 CPU, 2 GB
RAM, Solaris 10 and perl 5.8.6. This is where I took my timings from.

Here's the --d_sql output.

2005-03-11 10:48:16.1043 Generated findKey: [genre::genre:::]
2005-03-11 10:48:16.1057 Backtrace:

   frame 0: Slim::DataStores::DBI::DataModel::find
(/export/SlimServer_v2005-03-11/Slim/DataStores/DBI/DBIStore.pm line 267)
   frame 1: Slim::DataStores::DBI::DBIStore::find
(/export/SlimServer_v2005-03-11/Slim/Web/Pages.pm line 140)
   frame 2: Slim::Web::Pages::__ANON__
(/export/SlimServer_v2005-03-11/Slim/Web/Pages.pm line 1901)
   frame 3: Slim::Web::Pages::browsedb
(/export/SlimServer_v2005-03-11/Slim/Web/HTTP.pm line 750)
   frame 4: Slim::Web::HTTP::generateHTTPResponse
(/export/SlimServer_v2005-03-11/Slim/Web/HTTP.pm line 671)
   frame 5: Slim::Web::HTTP::processURL
(/export/SlimServer_v2005-03-11/Slim/Web/HTTP.pm line 535)
   frame 6: Slim::Web::HTTP::processHTTP
(/export/SlimServer_v2005-03-11/Slim/Networking/Select.pm line 116)
   frame 7: Slim::Networking::Select::select (slimserver.pl line 569)
   frame 8: main::idle (slimserver.pl line 512)
   frame 9: main::main (slimserver.pl line 1061)

2005-03-11 10:48:16.1059 Running SQL query: [SELECT DISTINCT genres.id AS
id,genres.name AS name,genres.namesort AS namesort,genres.moodlogic_id AS
moodlogic_id,genres.moodlogic_mixable AS
moodlogic_mixable,genres.musicmagic_mixable AS musicmagic_mixable FROM genres 
ORDER BY genres.namesort]
2005-03-11 10:48:25.8040 Generated findKey: [track:genre:2:track:::]
2005-03-11 10:48:25.8052 Start and End node: [genre:default]
2005-03-11 10:48:25.8062 Backtrace:

   frame 0: Slim::DataStores::DBI::DataModel::find
(/export/SlimServer_v2005-03-11/Slim/DataStores/DBI/DBIStore.pm line 267)
   frame 1: Slim::DataStores::DBI::DBIStore::find
(/export/SlimServer_v2005-03-11/Slim/Control/Command.pm line 1674)
   frame 2: Slim::Control::Command::parseSearchTerms
(/export/SlimServer_v2005-03-11/Slim/Control/Command.pm line 914)
   frame 3: Slim::Control::Command::execute
(/export/SlimServer_v2005-03-11/Slim/Web/HTTP.pm line 667)
   frame 4: Slim::Web::HTTP::processURL
(/export/SlimServer_v2005-03-11/Slim/Web/HTTP.pm line 535)
   frame 5: Slim::Web::HTTP::processHTTP
(/export/SlimServer_v2005-03-11/Slim/Networking/Select.pm line 116)
   frame 6: Slim::Networking::Select::select (slimserver.pl line 569)
   frame 7: main::idle (slimserver.pl line 512)
   frame 8: main::main (slimserver.pl line 1061)

2005-03-11 10:48:25.8065 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 genre_track, contributor_track, tracks, albums, genres WHERE
contributor_track.track = tracks.id AND genre_track.track = tracks.id AND
albums.id = tracks.album AND genres.id = genre_track.genre  AND (
genre_track.genre = ? ) ORDER BY contributor_track.namesort, albums.titlesort,
tracks.disc, tracks.tracknum, tracks.titlesort]
2005-03-11 10:48:25.8067 Bind arguments: [2]

The music started at Fri Mar 11 10:55:59 MST 2005. 
Comment 3 Dan Sully 2005-03-11 10:11:33 UTC
Jason - I've checked in a change that might solve this problem. Could you sync
your svn tree and try again?
Comment 4 Dan Sully 2005-03-11 10:13:20 UTC
Ah, wait. That didn't fix it. Did fix another issue though.
Comment 5 Jason Holtzapple 2005-03-11 10:21:32 UTC
I'm going to install subversion. Let me know when you want me to try again.
Comment 6 Dan Sully 2005-03-15 17:53:05 UTC
Jason - this has been fixed as of subversion change 2515 - please give it a go.
Comment 7 Jason Holtzapple 2005-03-16 07:24:23 UTC
This has vastly improved and is even a little faster than 5.4.1. Thanks!