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
json_parser is a hot spot under high load as it allocates too many objects.
The problem is exacerbated by the json library used as it is not optimized to handle the creation of a []byte slice that is not preallocated, creating many copies as it is resized.
Component(s)
pkg/stanza
What happened?
Description
json_parser is a hot spot under high load as it allocates too many objects.
The problem is exacerbated by the json library used as it is not optimized to handle the creation of a []byte slice that is not preallocated, creating many copies as it is resized.
https://github.com/json-iterator/go/blob/71ac16282d122fdd1e3a6d3e7f79b79b4cc3b50e/iter_str.go#L35
Steps to Reproduce
Expected Result
Actual Result
Collector version
v0.103.0
Environment information
Environment
OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")
OpenTelemetry Collector configuration
No response
Log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: