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

ASF subversion and git services commented on GEODE-7820:
--------------------------------------------------------

Commit ca7ccbce73d436005fe027f31ee910ee9beeb769 in geode's branch 
refs/heads/mass-test-run from Juan José Ramos
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=ca7ccbc ]

GEODE-7820: Avoid Unnecessary toArray Invocations (#4741)

Avoid unnecessary invocations to the 'toArray' method and directly
use the java collection received instead.

> Avoid Unnecessary toArray Invocations
> -------------------------------------
>
>                 Key: GEODE-7820
>                 URL: https://issues.apache.org/jira/browse/GEODE-7820
>             Project: Geode
>          Issue Type: Bug
>          Components: membership
>            Reporter: Juan Ramos
>            Assignee: Juan Ramos
>            Priority: Major
>              Labels: GeodeCommons
>             Fix For: 1.12.0, 1.13.0
>
>         Attachments: Screenshot 2020-02-27 at 12.59.23.png, setRecipients.png
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> The {{DistributionMessage}} class receives the recipients as a {{Collection}} 
> object (which is always a {{Set}} after inspecting the calls) but it 
> internally transforms the collection into an array {{[]}}, this 
> transformation appears to be useless as we end up converting the array {{[]}} 
> into a {{List}} across several parts of the code afterwards when we need to 
> do something with it.
> Using one of our internal testing scenarios and a java profiler we detected 
> that, under the current develop {{branch}}, we spend ~8 seconds more than 
> when using Geode 1.10 just by executing this {{toArray}} transformation 
> (screenshot attached), which can be completely avoided.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to