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
Is your feature request related to a problem? Please describe.
Udp receiver needs to to be maximally optimized since in high-scale scenarios, it's very easy to lose data.
Specifically, udp-receiver calls the decoder even when nop encoding is defined. That is unnecessary, since all the decoder does is copy the byte array to a new byte array (see here: https://cs.opensource.google/go/x/text/+/refs/tags/v0.14.0:transform/transform.go;l=313). The udp-receiver immediately converts that byte array to a string anyway.
Describe the solution you'd like
In handleMessage, in nop encoding is configured, don't run the decode method.
This saves a memory allocation for each packet. In high scale scenarios, it can mean hundred of thousands less allocation per second, which reduces load on the GC, and reduces memory usage.
Describe alternatives you've considered
None. This is a very specific suggestion.
Additional context
No response
The text was updated successfully, but these errors were encountered:
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.
Component(s)
pkg/stanza, receiver/udplog
Is your feature request related to a problem? Please describe.
Udp receiver needs to to be maximally optimized since in high-scale scenarios, it's very easy to lose data.
Specifically, udp-receiver calls the decoder even when nop encoding is defined. That is unnecessary, since all the decoder does is copy the byte array to a new byte array (see here: https://cs.opensource.google/go/x/text/+/refs/tags/v0.14.0:transform/transform.go;l=313). The udp-receiver immediately converts that byte array to a string anyway.
Describe the solution you'd like
In handleMessage, in nop encoding is configured, don't run the decode method.
This saves a memory allocation for each packet. In high scale scenarios, it can mean hundred of thousands less allocation per second, which reduces load on the GC, and reduces memory usage.
Describe alternatives you've considered
None. This is a very specific suggestion.
Additional context
No response
The text was updated successfully, but these errors were encountered: