[jboss-jira] [JBoss JIRA] (JGRP-2076) TransferQueueBundler: bundler thread should remove chunks of messages
Bela Ban (JIRA)
issues at jboss.org
Tue Jun 7 06:31:00 EDT 2016
Bela Ban created JGRP-2076:
------------------------------
Summary: TransferQueueBundler: bundler thread should remove chunks of messages
Key: JGRP-2076
URL: https://issues.jboss.org/browse/JGRP-2076
Project: JGroups
Issue Type: Enhancement
Reporter: Bela Ban
Assignee: Bela Ban
Priority: Minor
Fix For: 3.6.10, 4.0
Currently, the bundler thread in TransferQueueBundler removes messages from the queue one by one:
{code:java}
while(null != (msg=queue.poll())) {
long size=msg.size();
if(count + size >= transport.getMaxBundleSize())
sendBundledMessages();
addMessage(msg, size);
}
{code}
This is inefficient, as we need to acquire the lock on ArrayBlockingQueue every time. {{ArrayBlockingQueue.drainTo()}} should be used instead, to remove as many messages as are in the queue with one lock acquisition.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jboss-jira
mailing list