optimize port lookup, adding/removing/reconnecting routes
authorRobin Gareus <robin@gareus.org>
Sun, 24 Apr 2016 16:24:06 +0000 (18:24 +0200)
committerRobin Gareus <robin@gareus.org>
Sun, 24 Apr 2016 16:26:39 +0000 (18:26 +0200)
commitd1874d4685e2047b5d44e07773c4e339883af0bb
tree3ff8964594e694453c7f2e1ade69fd7bb8e95319
parent1321701189e162a72ca0f52d10ac01d1f29619c4
optimize port lookup, adding/removing/reconnecting routes

xxxAudioBackend::connected_to() is called O(N^2) when building the graph.
Mitigate this by using an O(log(N)) lookup.

This duplicates the storage (both set and map and both are kept in sync.
Changing this to a boost:bidirectional might be nice, before updating
other backends.
libs/backends/dummy/dummy_audiobackend.cc
libs/backends/dummy/dummy_audiobackend.h