[jboss-jira] [JBoss JIRA] (JGRP-2126) Table.removeMany() creates unneeded temporary list

Bela Ban (JIRA) issues at jboss.org
Mon Nov 7 07:39:00 EST 2016


    [ https://issues.jboss.org/browse/JGRP-2126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13318115#comment-13318115 ] 

Bela Ban commented on JGRP-2126:
--------------------------------

In NAKACK2 and UNICAST3, we also create a temp list in {{up(MessageBatch batch)}} to add messages to the table. However, perhaps we should simply modify or remove messages in the batch directly and then pass the batch as argument to {{Table.add()}}.

> Table.removeMany() creates unneeded temporary list
> --------------------------------------------------
>
>                 Key: JGRP-2126
>                 URL: https://issues.jboss.org/browse/JGRP-2126
>             Project: JGroups
>          Issue Type: Enhancement
>            Reporter: Bela Ban
>            Assignee: Bela Ban
>             Fix For: 4.0
>
>
> When a thread acquires the CAS in NAKACK2 or UNICAST3 to deliver messages, it calls Table.removeMany() which removes messages that satisfy a condition and return them as a list. Next, a MessageBatch is created off of that list and passed up.
> The creation of the temp list is unnecessary; instead create a properly sized MessageBatch and make Table.removeMany() add the messages directly into the batch.



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jboss-jira mailing list