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.