Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-11493

Unnecessary creation of singlton lists in DistributedUpdateProcessor

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.2
    • Component/s: SolrCloud
    • Labels:
      None

      Description

      I thought I'd found another bug because one of 4 variants didn't have a loop, but then I noticed that the method in question was being fed a list, and the very first thing it does is loop that list... so it seems there is no need to loop the list, create and pass in a singleton list, and then have the method loop that singleton list to process a single item...

      Fixing this should save us a bit of object creation & therefore reduce GC load.

        Attachments

        1. SOLR-11493.patch
          2 kB
          Gus Heck

          Activity

            People

            • Assignee:
              dsmiley David Smiley
              Reporter:
              gus Gus Heck
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: