Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-7820

Avoid Unnecessary toArray Invocations

    XMLWordPrintableJSON

Details

    Description

      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.

      Attachments

        1. Screenshot 2020-02-27 at 12.59.23.png
          232 kB
          Juan Ramos
        2. setRecipients.png
          236 kB
          Juan Ramos

        Issue Links

          Activity

            People

              echobravo Ernest Burghardt
              jjramos Juan Ramos
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m