You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2018/07/31 12:13:54 UTC

[GitHub] kiss-yu opened a new issue #384: Optimization of pickOneAtLeast() method

kiss-yu opened a new issue #384: Optimization of  pickOneAtLeast() method
URL: https://github.com/apache/rocketmq/issues/384
 
 
   ### Method optimization
   For the current pickOneAtLeast method, there is a scrambled step in tmpList query selection. For Collections.shuffle () and Collections.sort (), List.toArray () will be executed when the underlying implementation is implemented. But when List is too large, the two time two calls to List.toArray () method will cause some waste of resources. Now combine the two operations of Collections.shuffle () and Collections.sort () to optimize the performance of two times List.toArray ().
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services