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

JsonRecordReader should not deep copy before handler.handle()

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.3, 7.0
    • Component/s: update
    • Security Level: Public (Default Security Level. Issues are Public)
    • Labels:
      None

      Description

      JsonRecordReader does a deep copy of the document map before calling handler.handle() method but it is not required because it is consumed in the same thread and not stored anywhere. The only place which needs a deep copy is the JsonRecordReader#getAllRecords method (used mostly for testing). Any such method can perform deep copy itself so that the common case is not penalized.

      This will save allocation of one copy of the map for each document.

        Attachments

        1. SOLR-9452.patch
          2 kB
          Shalin Shekhar Mangar
        2. SOLR-9452.patch
          2 kB
          Noble Paul
        3. SOLR-9452.patch
          2 kB
          Shalin Shekhar Mangar

          Activity

            People

            • Assignee:
              shalinmangar Shalin Shekhar Mangar
              Reporter:
              shalinmangar Shalin Shekhar Mangar
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: