13
0

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:
Robin Gareus 2022-05-06 01:19:06 +02:00
parent 37c0fceeac
commit ed21ea8fc6
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -230,7 +230,7 @@ protected:
bool valid_port (BackendPortHandle port) const {
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 {