You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Shalin Shekhar Mangar (JIRA)" <ji...@apache.org> on 2016/08/29 13:43:20 UTC

[jira] [Updated] (SOLR-9452) JsonRecordReader should not deep copy before handler.handle()

     [ https://issues.apache.org/jira/browse/SOLR-9452?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shalin Shekhar Mangar updated SOLR-9452:
----------------------------------------
    Attachment: SOLR-9452.patch

Fix which moves the deep copy to the getAllRecords() method. Also, I removed the getDeepCopy method inside JsonRecordReader.Node and switched to using Utils.getDeepCopy method.

> JsonRecordReader should not deep copy before handler.handle()
> -------------------------------------------------------------
>
>                 Key: SOLR-9452
>                 URL: https://issues.apache.org/jira/browse/SOLR-9452
>             Project: Solr
>          Issue Type: Improvement
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: update
>            Reporter: Shalin Shekhar Mangar
>             Fix For: master (7.0), 6.3
>
>         Attachments: SOLR-9452.patch
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org