From 548c19496cdbdfb088c4053274e8c93a45f31100 Mon Sep 17 00:00:00 2001 From: "Hiram R. Chirino" Date: Wed, 15 May 2013 13:02:27 +0000 Subject: [PATCH] reduce the number of times the sendSyncs map is accessed. git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1482800 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/activemq/broker/region/Queue.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java b/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java index 79cf093d28..75f1504bbb 100755 --- a/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java +++ b/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java @@ -800,18 +800,15 @@ public class Queue extends BaseDestination implements Task, UsageListener { ArrayList syncs = new ArrayList(orderedWork.size());; sendLock.lockInterruptibly(); - try { for (Transaction tx : orderedWork) { - SendSync sync = sendSyncs.get(tx); + SendSync sync = sendSyncs.remove(tx); sync.processSend(); syncs.add(sync); - sendSyncs.remove(tx); } } finally { sendLock.unlock(); } - for (SendSync sync : syncs) { sync.processSent(); }