Bug 1160 - Problem with shuffle modes
: Problem with shuffle modes
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Playlists
: 6.0.0
: PC Windows XP
: P2 normal with 1 vote (vote)
: ---
Assigned To: Dan Sully
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-03-22 13:27 UTC by Craig Garnett
Modified: 2009-09-08 09:19 UTC (History)
2 users (show)

See Also:
Category: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Craig Garnett 2005-03-22 13:27:02 UTC
I found problems with the 03/21 nightly that caused the sever to crash when
selecting Shuffle by Album.  That seems to have been fixed in 03/22 but now
I'm seeing that with a playlist of 9000 songs, switching between shuffle
off and shuffle by song takes around 3 seconds but switching to shuffle by
album takes over 2 minuets of 100% cpu.
Comment 1 Dan Sully 2005-03-22 17:16:51 UTC
Craig - this happens because Shuffle by Album needs to hit the database. I'm
looking at where it can be optimized, but I'm not sure how much I'll be able to
do here.
Comment 2 Craig Garnett 2005-03-23 00:07:57 UTC
Dan - I don't remember seeing this before and I'm sure that the crash only 
appeared on the 22/1 build. I don't use shuffle by album much but if you are 
using the remote and are in 'shuffle by song' then you have to go 
through 'shuffle by album' to turn shuffle off, thus is how I came across the 
problem.

"I'm not sure how much I'll be able to do here." - you seem to have worked 
plenty of other miracles lately :-)

Craig 
Comment 3 Jason Snell 2005-04-02 09:19:36 UTC
I can confirm this as a crashing bug when I tried it with 6.0/6.0.1 -- large playlist (400+ tracks) in the 
now playing, multi-seconds to toggle to shuffle off, and toggling into shuffle by song crashed the server.
Comment 4 KDF 2005-04-02 12:35:37 UTC
jason, can you supply the crash message that you saw?

how about this for one idea: 
shuffle = shuffle_toggle (song/off)
shuffle.hold = shuffle_album_toggle (album/off)

this way, if album is a hit, there is an option to avoid it.
Comment 5 Craig Garnett 2005-04-03 01:07:04 UTC
Well that would be a good workaround until the problem is fixed ;-)
Actually it might be a better way to handle the shuffle mode either way.
Comment 6 Dan Sully 2005-04-07 17:56:13 UTC
Vidur is working on a rework of the Player UI browsing code. This is somewhat
related, in that we'll be returning objects instead of strings, so going to the
database again won't happen.

I'm also going to be reworking the Playlist code all about the server to be more
streamlined and to use the database.

Targetting for 6.1
Comment 7 Dan Sully 2005-04-19 17:00:42 UTC
A first cut of an optimization has been checked into 6.1/trunk as subversion change 3007.

Vidur will make a second pass to optimize further.
Comment 8 Craig Garnett 2005-04-21 13:43:23 UTC
Using the 04-21 windows exe I see a halfing of the time taken although I'm 
still getting the 'Lost contact' message. Also a few times when selecting 
Shuffle by Album on the player UI, the server has quit. I've not seen this when 
changing modes from the web UI.
Comment 9 Vidur Apparao 2005-04-21 21:13:29 UTC
*** Bug 1407 has been marked as a duplicate of this bug. ***
Comment 10 Vidur Apparao 2005-04-27 18:31:15 UTC
I've checked in a further improvement to Shuffle by Album. Craig, could you try
the 4/28 nightly build and let me know if you seen an improvement?
Comment 11 Craig Garnett 2005-04-28 10:56:26 UTC
That's another halving Vidur, It's now down to 30 seconds, still getting the 
loss of contact though.
Would it be much work to include KDF's suggestion of

shuffle = shuffle_toggle (song/off)
shuffle.hold = shuffle_album_toggle (album/off) ?

I think that would make the whole function much better.


Comment 12 Blackketter Dean 2005-04-28 14:52:01 UTC
I"m not sure that changing the UI because the backend is slow is the right solution.  Do note that lots of 
folks accidentally press-and-hold when they mean to press.  Press-and-hold should be a superset of 
whatever a simple press is.
Comment 13 Blackketter Dean 2005-06-07 14:15:00 UTC
Vidur: what's the status of this?
Comment 14 Blackketter Dean 2005-06-10 16:07:51 UTC
dan has some performance tweaking he's working on.
Comment 15 Dan Sully 2005-06-24 11:06:10 UTC
This should be much faster now with the new playlistdb code in the 6.1 tree.
Comment 16 Craig Garnett 2005-06-25 02:28:47 UTC
That's almost instant now, even with a playlist of 9500 songs.

Great work guys
Thanks
Comment 17 Chris Owens 2008-03-11 11:28:01 UTC
This bug was marked resolved in Slimserver 6.1, which is several versions ago.  If you're still seeing this bug, please re-open it.  Thanks!