diff options
| author | Matthias Radestock <matthias@rabbitmq.com> | 2012-11-16 17:43:42 +0000 |
|---|---|---|
| committer | Matthias Radestock <matthias@rabbitmq.com> | 2012-11-16 17:43:42 +0000 |
| commit | 471a7ab4d4ebff003cc96fb6ec1e5c7c6079a3b8 (patch) | |
| tree | 34a5acf991a9668f84ff449db7c100f083a2ee31 | |
| parent | ece39797579874b9f53ef9829c28b662bcd48b67 (diff) | |
| download | rabbitmq-server-git-471a7ab4d4ebff003cc96fb6ec1e5c7c6079a3b8.tar.gz | |
optimise
this brings perf roughly on par with default
| -rw-r--r-- | src/rabbit_channel.erl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rabbit_channel.erl b/src/rabbit_channel.erl index f8f099f674..6ccc2e65d2 100644 --- a/src/rabbit_channel.erl +++ b/src/rabbit_channel.erl @@ -1360,8 +1360,10 @@ deliver_to_queues({Delivery = #delivery{message = Message = #basic_message{ {QNames1, QMons1} = lists:foldl(fun (#amqqueue{pid = QPid, name = QName}, {QNames0, QMons0}) -> - {dict:store(QPid, QName, QNames0), - pmon:monitor(QPid, QMons0)} + {case dict:is_key(QPid, QNames0) of + true -> QNames0; + false -> dict:store(QPid, QName, QNames0) + end, pmon:monitor(QPid, QMons0)} end, {QNames, pmon:monitor_all(DeliveredQPids, QMons)}, Qs), State1 = process_routing_result(RoutingRes, DeliveredQPids, XName, MsgSeqNo, Message, |
