As said in #864:
json.Decoder() copies data from the reader into a temporary buffer. This is an extra copy that is not necessary since we have the data as a slice already.
json.NewDecoder is not optimal for our use. We should replace the following with json.Unmarshal:
|
if err := json.NewDecoder(strings.NewReader(record)).Decode(&v); err != nil { |