good morning!!!!

Skip to content
Snippets Groups Projects
Commit 8368bfae authored by a's avatar a
Browse files

reader pool

parent e93ac3b4
No related branches found
No related tags found
No related merge requests found
......@@ -322,9 +322,11 @@ func parsePositionalArguments(rawArgs json.RawMessage, types []reflect.Type) ([]
return args, nil
}
var jzpool = jsoniter.NewIterator(jzon).Pool()
func parseArgumentArray(p json.RawMessage, types []reflect.Type) ([]reflect.Value, error) {
dec := jsoniter.NewIterator(jzon)
dec.ResetBytes(p)
dec := jzpool.BorrowIterator(p)
defer jzpool.ReturnIterator(dec)
args := make([]reflect.Value, 0, len(types))
for i := 0; dec.ReadArray(); i++ {
if i >= len(types) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment