[ 
https://issues.apache.org/jira/browse/AMQ-7300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16924379#comment-16924379
 ] 

ASF subversion and git services commented on AMQ-7300:
------------------------------------------------------

Commit 65de327369f24de008f857211b97d3c69283a932 in activemq's branch 
refs/heads/master from Christopher L. Shannon (cshannon)
[ https://gitbox.apache.org/repos/asf?p=activemq.git;h=65de327 ]

AMQ-7300 - Remove unnecessary call to sequence updater as read is already 
volatile


> LongSequenceGenerator should use AtomicLongFieldUpdater for performance
> -----------------------------------------------------------------------
>
>                 Key: AMQ-7300
>                 URL: https://issues.apache.org/jira/browse/AMQ-7300
>             Project: ActiveMQ
>          Issue Type: Improvement
>          Components: Broker
>    Affects Versions: 5.15.10
>            Reporter: Christopher L. Shannon
>            Assignee: Christopher L. Shannon
>            Priority: Minor
>             Fix For: 5.16.0
>
>
> I was doing some performance testing and profiling a broker with a high 
> message throughput and noticed a hot spot on the getNextSequenceId() method 
> of the LongSequenceGenerator class. This class gets used a lot of generating 
> sequences in the broker including messages and currently it's synchronization 
> for the methods.  
> Instead we can use an AtomicLongFieldUpdater and volatile long to remove the 
> synchronization.  Using an AtomicLongFieldUpdater instead of an AtomicLong 
> will prevent having to garbage collect a lot of new objects.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to