[alsa-devel] [PATCH 2/2] ASoC: dapm: Add cache to speed up adding of routes

Mark Brown broonie at kernel.org
Thu May 7 15:16:10 CEST 2015


On Thu, May 07, 2015 at 01:22:07PM +0200, Lars-Peter Clausen wrote:

> That's crazy! ;)

> I wonder if it makes sense to come up with a more machine readable blob
> format that can be pre-compiled where we don't have to search the widget
> list each time a route is added. Instead of having it reference the widgets
> by name use a index that points into an array of widgets. That makes the
> lookup time O(1).

I'm a bit reluctant to complicate the build process, but like I said inn
my review there's definitely things we can do at runtime if people want
to look at this - build some data structure that indexes the names in a
way that allows us to look them up more quickly.  In general I'd expect
it to be negligable cost for small devices and a win for larger ones.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20150507/064085d9/attachment-0001.sig>


More information about the Alsa-devel mailing list