[Pkg-alsa-devel] Bug#552240: libasound2: speed up snd_device_name_hint by caching path to libasound.so
John Lindgren
john.lindgren at tds.net
Sat Oct 24 15:51:13 UTC 2009
Package: libasound2
Version: 1.0.21a-1
Severity: normal
Tags: patch
In a call to snd_device_name_hint, snd_dlopen is frequently called with
the parameter name == NULL, meaning to open libasound.so itself. In
this case, snd_dlopen calls dladdr on every call to find out the path to
libasound.so. I am attaching a simple patch to cache this path within
snd_dlopen so that dladdr is called only once; with this patch, the
execution time of snd_device_name_hint (a somewhat slow call) is reduced
by 40%.
Peace,
John Lindgren
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.30-2-686 (SMP w/1 CPU core)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages libasound2 depends on:
ii libc6 2.9-25 GNU C Library: Shared libraries
libasound2 recommends no packages.
Versions of packages libasound2 suggests:
ii libasound2-plugins 1.0.21-1 ALSA library additional plugins
-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dlmisc.c.diff
Type: text/x-patch
Size: 446 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-alsa-devel/attachments/20091024/08d45fdf/attachment.bin>
More information about the Pkg-alsa-devel
mailing list