Phonon device discovery takes too long

Matthias Kretz kretz at kde.org
Wed Oct 31 14:33:41 GMT 2007


Hi,

On Monday 29 October 2007, Tobias Koenig wrote:
> Hej,
>
> when starting a KDE4 session or any other application in trunk which
> makes use of Phonon, there is a delay which seems to be caused by some
> discovery work of Phonon.

From all I know the loading of the xine backend is very expensive (in large 
parts due to libxine dlopening all its plugins on init).

If you found it is blocking on ALSA device discovery let me know, but from all 
I've seen that's pretty fast.

In your app you should consider to not trigger construction of the Phonon 
backend on startup (which is one of the reasons why I wanted the backends to 
be loadable). You can do that by either not creating any Phonon objects 
(safe), or by not connecting Phonon objects or calling setters on them.

> Output on startup:
> --------------------------------------
> kaccess(4486) Phonon::KdePlatformPlugin::createBackend: using backend: 
> "Xine"

^^ This should be the expensive part

> ALSA lib setup.c:555:(add_elem) Cannot obtain info for CTL elem 
> (MIXER,'IEC958 Playback AC97-SPSA',0,0,0): No such file or directory
> ALSA lib setup.c:555:(add_elem) Cannot obtain info for CTL elem
> (MIXER,'IEC958 Playback AC97-SPSA',0,0,0): No such file or directory

^^ Those warnings come from libasound - nothing I know to supress them. The 
code is just querying what's there...

> kaccess(4486) kdemain: X server XKB extension major= 1  minor= 0
> WARNING: requested invalid MediaSource for the current source of MediaObject

^^ This shows a bug in the code. Something is calling 
setCurrentSource(MediaSource()) or so. It's not a big deal, just some wasted 
CPU cycles.

> -------------------------------------- 
>
> So the startup looks unprofessional, as the user is left with a blank
> screen for several seconds (depending on the hardware ;)) and some
> applications (e.g. kontact) have unnecessary long startup times.
>
> Is this only a bug on my system or can anybody else reproduce it?

-- 
________________________________________________________
Matthias Kretz (Germany)                            <><
http://Vir.homelinux.org/
MatthiasKretz at gmx.net, kretz at kde.org,
Matthias.Kretz at urz.uni-heidelberg.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071031/8aa9cf0f/attachment.sig>


More information about the kde-core-devel mailing list