Bug 98477 - KAudioCreator very slow now
Summary: KAudioCreator very slow now
Status: RESOLVED FIXED
Alias: None
Product: kaudiocreator
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: VHI critical
Target Milestone: ---
Assignee: Gerd Fleischer
URL:
Keywords:
: 99192 100315 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-02-03 06:05 UTC by geiseri
Modified: 2006-11-14 00:00 UTC (History)
11 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch which fixes the problem for me (1016 bytes, patch)
2005-02-22 01:50 UTC, Richard Lärkäng
Details

Note You need to log in before you can comment on or make changes to this bug.
Description geiseri 2005-02-03 06:05:04 UTC
Version:           1.12 (using KDE 3.3.91 (beta1), yes)
Compiler:          gcc version 3.3.5 (Debian 1:3.3.5-7)
OS:                Linux (i686) release 2.6.10-1-k7

basicly cdparinoia takes about 20 seconds to rip the cd.  kaudiocreator takes about 10 minutes.  what changed?
Comment 1 icefox 2005-02-03 06:33:21 UTC
What about when using audiocd?
Comment 2 geiseri 2005-02-03 14:15:21 UTC
looks like the same behaviour.

Comment 3 icefox 2005-02-06 00:03:56 UTC
Does it happen only when ripping to wav? 
Comment 4 icefox 2005-02-06 00:39:23 UTC
I can't confirm.  Works fine here.
Comment 5 Richard Lärkäng 2005-02-22 01:50:29 UTC
Created attachment 9765 [details]
Patch which fixes the problem for me

I'm seeing this one here too.

I think it's related to the code in TracksImp::timerDone()
which calls wm_cd_init/destroy every 1.5 seconds.

I have attached a patch which fixes the problem for me.
But I don't know much about libwm, so it's quite possible that this isn't the
right fix.
Comment 6 Richard Lärkäng 2005-02-22 01:57:16 UTC
I don't see this one in audiocd though.
Comment 7 Matt Rogers 2005-02-22 01:59:52 UTC
right, audiocd works well, kaudiocreator doesn't so much. Will try your patch and report back
Comment 8 icefox 2005-02-22 02:03:50 UTC
yah audiocd doesn't have any quering capability so that isn't the problem.
Comment 9 icefox 2005-02-26 19:14:02 UTC
*** Bug 100315 has been marked as a duplicate of this bug. ***
Comment 10 icefox 2005-04-09 07:51:43 UTC
*** Bug 99192 has been marked as a duplicate of this bug. ***
Comment 11 Jacek K. Blaszkowski 2005-04-14 22:10:17 UTC
The same here. After inserting an audio cd, kaudiocreator succesfully reads toc, but then does something with CD over and over and over. Thus, ripping is painfully slow.
It started with upgrade to KDE 3.4, in previous versions kaudiocreator was ripping just fine.
It occurs only on one of my machines:
#v+
root@marusia:~# hdparm -i /dev/hdc

/dev/hdc:

 Model=SAMSUNG CD-R/RW SW-240B, FwRev=R403, SerialNo=
 Config={ Fixed Removeable DTR<=5Mbs DTR>10Mbs nonMagnetic }
 RawCHS=0/0/0, TrkSize=0, SectSize=0, ECCbytes=0
 BuffType=unknown, BuffSize=0kB, MaxMultSect=0
 (maybe): CurCHS=0/0/0, CurSects=0, LBA=yes, LBAsects=0
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4
 DMA modes:  sdma0 sdma1 sdma2 mdma0 mdma1 *mdma2
 AdvancedPM=no
 Drive conforms to: ATA/ATAPI-5 T13 1321D revision 3:

root@marusia:~# uname -a
Linux marusia 2.6.7 #1 Wed Jun 16 16:23:03 PDT 2004 i686 unknown unknown GNU/Linux

#v-
This machine is running Slackware-current with KDE3.4 packages from slackware.org installed.
I also tried 2.6.9 kernel, but it didn't help.


On another machine everything's fine:
#v+
root@szarik:~# hdparm -i /dev/hdc

/dev/hdc:

 Model=HL-DT-ST CD-RW GCE-8524B, FwRev=1.00, SerialNo=
 Config={ Removeable DTR<=5Mbs DTR>10Mbs nonMagnetic }
 RawCHS=0/0/0, TrkSize=0, SectSize=0, ECCbytes=0
 BuffType=unknown, BuffSize=1024kB, MaxMultSect=0
 (maybe): CurCHS=0/0/0, CurSects=0, LBA=yes, LBAsects=0
 IORDY=on/off, tPIO={min:383,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4
 DMA modes:  sdma0 sdma1 sdma2 mdma0 mdma1 mdma2
 UDMA modes: udma0 udma1 *udma2
 AdvancedPM=no

root@szarik:~# uname -a
Linux szarik 2.4.26 #6 Mon Jun 14 19:07:27 PDT 2004 i686 unknown unknown GNU/Linux
#v-
This machine is running Slackware-current with KDE3.4 packages from slackware.org installed. The device has an ide-scsi driver attached.
Comment 12 Joe Morris 2005-04-20 18:27:43 UTC
This patch fixes the KAudioCreator slowness for me with SuSE 9.2 x86_64, KDE 3.4.  What a difference!  It went from taking a couple of hours to encode an audio cd to ogg to a few minutes.  I would vote for this patch to solve this problem.
Comment 13 icefox 2005-04-25 01:10:22 UTC
Just a note that this _will_ be fixed for 3.4.1

I have six or so DVD-Rom and cd-rom drives, none of which show this problem (or when it showed up last time).  If anyone upgrades there cdrom/dvd drive donating the old drive (that can cause this bug) to me would be apprechiated to prevent this bug from making it into the release in the future.

Comment 14 Gioele Barabucci 2005-05-04 14:27:38 UTC
It happens (kde 3.4.0) with my DVD/CD-RW drive (iBook G3)

woodstock ~ # hdparm -i /dev/hdb

/dev/hdb:

 Model=SONY CD-RW CRX800E, FwRev=1.3p, SerialNo=
 Config={ Fixed Removeable DTR<=5Mbs DTR>10Mbs nonMagnetic }
 RawCHS=0/0/0, TrkSize=0, SectSize=0, ECCbytes=0
 BuffType=unknown, BuffSize=0kB, MaxMultSect=0
 (maybe): CurCHS=0/0/0, CurSects=0, LBA=yes, LBAsects=0
 IORDY=on/off, tPIO={min:180,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4
 DMA modes:  mdma0 mdma1 *mdma2
 AdvancedPM=no

I'm setting up a kaudiocreator cvs ebuild so I'll be able to test changes if you tell me when to try and which packages I should build.
Comment 15 Richard Lärkäng 2005-05-22 16:28:28 UTC
SVN commit 416893 by larkang:

Hopefully fix the slowness-problem in kaudiocreator.
Fixes the problem for me, but would be nice if someone
comfirmed that it works.

CCBUG: 98477

Will commit a different fix for trunk, but waiting
for Ben to comment on it


 M  +7 -2      branches/KDE/3.4/kdemultimedia/kaudiocreator/tracksimp.cpp  


--- branches/KDE/3.4/kdemultimedia/kaudiocreator/tracksimp.cpp #416892:416893
@@ -77,6 +77,8 @@
 	QTimer *timer = new QTimer( this );
 	connect( timer, SIGNAL(timeout()), this, SLOT(timerDone()) );
 	timer->start( 1500, false ); // 1.5 seconds forever timer
+
+	wm_cd_init(WM_CDIN, (char *)qstrdup(QFile::encodeName(device)), NULL, NULL, NULL);
 }
 
 /**
@@ -96,6 +98,8 @@
 
 	Prefs::setDevice(list);
 	Prefs::writeConfig();
+
+	wm_cd_destroy();
 }
 
 /**
@@ -136,9 +140,7 @@
  * this routine.
  */
 void TracksImp::timerDone() {
-	wm_cd_init(WM_CDIN, (char *)qstrdup(QFile::encodeName(device)), NULL, NULL, NULL);
 	lookupDevice();
-	wm_cd_destroy();
 }
 
 void TracksImp::lookupDevice() {
@@ -240,6 +242,9 @@
 
 	device = file;
 
+	wm_cd_destroy();
+	wm_cd_init(WM_CDIN, (char *)qstrdup(QFile::encodeName(device)), NULL, NULL, NULL);
+
 	KApplication::setOverrideCursor(Qt::waitCursor);
 	timerDone();
 	KApplication::restoreOverrideCursor();
Comment 16 icefox 2005-05-22 17:29:11 UTC
Beat me to it. (for those who don't know tomarrow is the deadline) I have also commit it to head, now let us pray that it doesn't break some other drive...
Comment 17 Brian Jonas 2005-05-22 20:01:18 UTC
That's great news! Thank you Benjamin and Richard.

I apologize for not understanding what happens next. Is there now an
updated version of the application that I can find somewhere?

I searched http://sourceforge.net/, http://www.kde.org/,
www.kde-apps.org/ and couldn't find the program.
http://freshmeat.net/projects/kaudiocreator/ has a copy that's not
updated.

Hope you can help, I'm looking forward to getting back to using
KAudioCreator again.

Brian
Comment 18 icefox 2005-05-22 20:04:30 UTC
It will be part of the KDE 3.4.1 release which will be tagged within the next 48 hours and released within the week.  If you want you can check the branch out of svn or using the 3.4.0 source release and patching with the above patch.
Comment 19 Jacek K. Blaszkowski 2005-06-14 14:03:47 UTC
I have just installed KDE 3.4.1 from Slackware official packages and kaudiocreator works like a charm again :) Good job, thank you.
Comment 20 H.H. 2005-07-08 15:23:20 UTC
I use KDE 3.4.1 (Suse 9.2) and KAudioCreator still is very slow (several minutes per song), so the solution seems not to work for me.
Comment 21 icefox 2005-07-11 08:33:24 UTC
Volker, please list your cd drive's model number and anything odd about your system (firewire cdrom etc) 
Comment 22 Robin Gertz 2006-11-14 00:00:54 UTC
/dev/hdc:

 Model=MATSHITADVD-ROM SR-8586, FwRev=3Y19, SerialNo=
 Config={ Fixed Removeable DTR<=5Mbs DTR>10Mbs nonMagnetic }
 RawCHS=0/0/0, TrkSize=0, SectSize=0, ECCbytes=0
 BuffType=unknown, BuffSize=0kB, MaxMultSect=0
 (maybe): CurCHS=0/0/0, CurSects=0, LBA=yes, LBAsects=0
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4
 DMA modes:  sdma0 sdma1 sdma2 mdma0 mdma1 mdma2
 UDMA modes: udma0 udma1 *udma2
 AdvancedPM=no

I've started KAudioCreator a hour ago or so and it is still busy with ripping the first 3 tracks of the CD. 

Versions:
KAudioCreator: 1.13
KDE: 3.5.5
Kernel: Linux Amarannon 2.6.17-10-386 #2 Fri Oct 13 18:41:40 UTC 2006 i686 GNU/Linux

Hardware is pretty standard. Nforce2 board, AMD Sempron CPU, already mentioned Matshita DVD-Rom as master at IDE2, an Aopen CD-RW as slave at IDE2, two hdds at IDE1. No raid, no firewire, no PCI extensions, no S-ATA.
I have experienced similar problems before, since i know KDE and KAudioCreator. Copying from the MP3 dir in audiocd:/ per Konqueror is also much to slow to be a reasonable solution either, but cdparanoia + lame are working fine and fast...