Skip to content

Commit

Permalink
kaizen: prepare for v1.0.0
Browse files Browse the repository at this point in the history
fixes: #144

fixes: #121

fixes: #81
Signed-off-by: Tim Bray <[email protected]>
  • Loading branch information
timbray committed Dec 31, 2022
1 parent b8e71ed commit 6d858cf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions flatten_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6d858cf

Please sign in to comment.