Speed up valid-port changes O(n) -> O(log(n))
This significantly reduces DSP load of sessions with many ports when using debug builds.
This commit is contained in:
parent
37c0fceeac
commit
ed21ea8fc6
@ -230,7 +230,7 @@ protected:
|
|||||||
|
|
||||||
bool valid_port (BackendPortHandle port) const {
|
bool valid_port (BackendPortHandle port) const {
|
||||||
boost::shared_ptr<PortIndex> p = _ports.reader ();
|
boost::shared_ptr<PortIndex> p = _ports.reader ();
|
||||||
return std::find (p->begin (), p->end (), port) != p->end ();
|
return p->find (port) != p->end ();
|
||||||
}
|
}
|
||||||
|
|
||||||
BackendPortPtr find_port (const std::string& port_name) const {
|
BackendPortPtr find_port (const std::string& port_name) const {
|
||||||
|
Loading…
Reference in New Issue
Block a user