On Thu, May 07, 2015 at 04:53:34PM +0200, Lars-Peter Clausen wrote:
On 05/07/2015 02:48 PM, Mark Brown wrote:
Should we just have the cache in the dapm context or the card instead of locally? It's only two pointers at the minute so there doesn't seem to be much cost from keeping it around and it might generate somme more hits for some use cases. Or to put it another way why is the cache optional and created and re-created here like this?
I don't think the cache will produce hits anywhere else other then adding routes from the same route table. That's the only place were the same widget or widgets close to each other are accessed sequentially. I'd prefer to keep it locally.
It's probably the overwhelmingly common case with the current implementation at least, we might get some extras from things like mic biases on boards and CODECs that handle variants by using multiple routing tables but they'll be vastly less common than things from the same table. My thinking here is more that improving the encapsulation makes it easier to do a better job later for no meaningful cost now.