Hide Forgot
It has been observed that when a large number of subscribers (1000s) exist on a queue that performance is noticeably degraded, even though only one of the subscribers is receiving each message (round-robin). In particular, QueueListeners::populate() and QueueListeners::addListener() are both slow in these cases. Since both the listeners and browsers are operating as FIFOs, it seems inefficient to use std::vector in this role since popping from the front of a vector is not supported directly and using erase(begin()) is very inefficient. Initial tests show that simply replacing the std::vector with a std::deque and erase(begin()) with pop_front() improves the 1000 sub case by a factor of 2 and the 10000 case by a factor of 5. Another factor of 2 is possible if the duplicate sub check in QueueListeners::add() can be removed, but tests are still ongoing for this change.