You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
node is not object or array - just getting length of node value as string
node is object or array - encoding whole node to slice of bytes and get length of encoded slice
The latter case causes allocations on every call of byte_len_cmp operation. This can lead to OOM errors because garbage collector doesn't clear these slices so often.
Replacing encoding with counting length of object or array node recursively can help significantly reduce allocations and even remove them in certain cases.
The text was updated successfully, but these errors were encountered:
Currently there are two cases for byte_len_cmp:
The latter case causes allocations on every call of byte_len_cmp operation. This can lead to OOM errors because garbage collector doesn't clear these slices so often.
Replacing encoding with counting length of object or array node recursively can help significantly reduce allocations and even remove them in certain cases.
The text was updated successfully, but these errors were encountered: