Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 31804 - dtd patch in 1.2.9-r1 causes unacceptable delay when using shuffle
Summary: dtd patch in 1.2.9-r1 causes unacceptable delay when using shuffle
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Jeremy Huddleston (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-23 03:01 UTC by Lars-Rune Nøstdal
Modified: 2004-02-26 02:55 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lars-Rune Nøstdal 2003-10-23 03:01:41 UTC
I'm using a large playlist +25000 songs.

When I emerge xmms-1.2.8-r2 with the default patches: random.patch and dtd.patch
uncommented there is a 3 second delay whenever I turn on "Random" when playing
songs and also when "Random" is on there is a 3 second delay when I select a
song to play manually.

When I emerge xmms-1.2.8-r2 with the default patches: random.patch and dtd.patch
commented things work normally.

Reproducible: Always
Steps to Reproduce:
1. emerge xmms-1.2.8-r2 with the default patches: random.patch and dtd.patch
uncommented (as it is by default)
2. Start xmms and add about 25000+ songs
3. Press random. Then also select a (not choosed by the random-generator) song
to play.

Actual Results:  
There is a 3 second delay whenever I toggle the "Random"-button on or off, and
when I select a song to play.

Expected Results:  
Not use 100% CPU and no delay.
Comment 1 SpanKY gentoo-dev 2003-10-24 00:56:25 UTC
like you kind of mention, i think this is only an issue with random ... dtd
has been there before -r2 and i didnt see 100% cpu utilization until random
joined the fray
Comment 2 Jeremy Huddleston (RETIRED) gentoo-dev 2004-01-22 20:15:08 UTC
Are you still having the problem with -r3?
Comment 3 Lars-Rune Nøstdal 2004-01-23 04:09:15 UTC
-r3 seems to work fine. :)
Comment 4 Sami Laitinen 2004-02-01 10:42:18 UTC
This same problem still exists in 1.2.8-r3 and 1.2.9 for me.
I have "only" ~4000 song playlist and it always pauses for about 5 seconds when manually changing song from playlist or when enabling shuffle. CPU usage also jumps to 100% during that time.
Comment 5 Jeremy Huddleston (RETIRED) gentoo-dev 2004-02-01 12:11:42 UTC
Ok, 1.2.8-r4 and 1.2.9-r1 use a new random patch to use srandom() if avail, and if not fall back on /dev/urandom.  Please give them a try and let me know.
Comment 6 Jeremy Huddleston (RETIRED) gentoo-dev 2004-02-01 12:16:43 UTC
Oh, and Sami, can you please tell me which plugins you have enabled.  Some plugins (like imms) modify the random song selection.
Comment 7 Sami Laitinen 2004-02-01 19:07:58 UTC
I think I found the problem; disabling "Dynamic taste detection" from options fixes the problem. No more delays when changing song or enabling shuffle and no more 100% CPU usage.

Emerged the 1.2.9-r1 and using only the default input plugins and ALSA 1.2.9 as output. No additional plugins.
Comment 8 Jeremy Huddleston (RETIRED) gentoo-dev 2004-02-01 21:04:12 UTC
Sami, could you perform one more test for me... I want to see if it's a problem with dtd or if it's caused by BOTH dtd and the random patch... can you comment out the random patch in the ebuild and re-emerge 1.2.9-r1, enable dtd, and see if that "fixes" it...
Comment 9 Sami Laitinen 2004-02-01 22:00:00 UTC
Emerged without random.patch and yes, the delay is still there.
Comment 10 Jeremy Huddleston (RETIRED) gentoo-dev 2004-02-03 00:59:45 UTC
Sami, do you think you could profile xmms (with OProfile) to help the dtd patch developer find the possible cause of the problem?
Comment 11 Jeremy Huddleston (RETIRED) gentoo-dev 2004-02-25 23:36:03 UTC
an ebuild for xmms-1.2.10 is ready, and the patchset contains updated dtd code which uses a balanced tree instead of a linked list.  Can you try it ouy, please?
Comment 12 Colin Macdonald 2004-02-26 02:39:56 UTC
That fixed things for me at least!  XMMS changes songs, toggles random on/off, etc  at normal speed again (I have ~5500 songs)
Comment 13 Jeremy Huddleston (RETIRED) gentoo-dev 2004-02-26 02:41:45 UTC
Great!