From 074d6dfb34cd2a22e6fd1c16586821f942f6cc75 Mon Sep 17 00:00:00 2001 From: Tim Bray Date: Sat, 31 Dec 2022 10:11:30 -0800 Subject: [PATCH] kaizen: prepare for v1.0.0 fixes: #144 fixes: #121 fixes: #81 Signed-off-by: Tim Bray --- flatten_json.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flatten_json.go b/flatten_json.go index e7fc84e..c14eee4 100644 --- a/flatten_json.go +++ b/flatten_json.go @@ -824,10 +824,10 @@ func (fj *flattenJSON) readHexUTF16(from int) ([]byte, int, error) { } } -// storeArrayElementField adds a field to be returned to the Flatten caller, straightforward except for the field needs its -// own snapshot of the array-trail data, because it'll be different for each array element -// NOTE: The profiler says this is the most expensive function in the whole matchesForJSONEvent universe, presumably -// because of the necessity to construct a new arrayTrail for each element. +// storeArrayElementField adds a field to be returned to the Flatten caller, straightforward except for the field needs +// its own snapshot of the array-trail data, because it'll be different for each array element +// NOTE: The profiler says this is the most expensive function in the whole matchesForJSONEvent universe, presumably +// because of the necessity to construct a new arrayTrail for each element. func (fj *flattenJSON) storeArrayElementField(path []byte, val []byte) { f := Field{Path: path, ArrayTrail: make([]ArrayPos, len(fj.arrayTrail)), Val: val} copy(f.ArrayTrail, fj.arrayTrail)