You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Ted Ross (JIRA)" <qp...@incubator.apache.org> on 2008/01/07 17:44:33 UTC
[jira] Closed: (QPID-696) Performance ehnancement for TopicExchange
[ https://issues.apache.org/jira/browse/QPID-696?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ted Ross closed QPID-696.
-------------------------
> Performance ehnancement for TopicExchange
> -----------------------------------------
>
> Key: QPID-696
> URL: https://issues.apache.org/jira/browse/QPID-696
> Project: Qpid
> Issue Type: Improvement
> Components: C++ Broker
> Environment: Any
> Reporter: Ted Ross
> Priority: Minor
>
> The current code in TopicExchange.cpp does a heap allocation per binding, per message. The following optimization removes the per-binding allocation and will improve performance particularly where there are many bindings on a topic exchange.
> Index: TopicExchange.cpp
> ===================================================================
>
> void TopicExchange::route(Deliverable& msg, const string& routingKey, const FieldTable* /*args*/){
> RWlock::ScopedRlock l(lock);
> + Tokens tokens(routingKey);
> +
> for (BindingMap::iterator i = bindings.begin(); i != bindings.end(); ++i) {
> - if (i->first.match(routingKey)) {
> + if (i->first.match(tokens)) {
> Queue::vector& qv(i->second);
> for(Queue::vector::iterator j = qv.begin(); j != qv.end(); j++){
> msg.deliverTo(*j);
> }
> }
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.