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
Using UDP#recvfrom_nonblock(buffer_size) we've noticed that the underlying strings are the size of the buffer always, regardless of the actual message size. The strings are accurate, but rather than actually truncating the underlying byte[] JRuby simply adjusts the underlying length of the string.
When performing a large number of reads off a UDP socket with a 64k buffer size this results in a large amount of unnecessary heap being allocated.
Tested with JRuby version 9.1.13.0
The text was updated successfully, but these errors were encountered:
Using
UDP#recvfrom_nonblock(buffer_size)
we've noticed that the underlying strings are the size of the buffer always, regardless of the actual message size. The strings are accurate, but rather than actually truncating the underlyingbyte[]
JRuby simply adjusts the underlying length of the string.When performing a large number of reads off a UDP socket with a 64k buffer size this results in a large amount of unnecessary heap being allocated.
Tested with JRuby version 9.1.13.0
The text was updated successfully, but these errors were encountered: