Here's a nasty NIO gotcha: passing a large heap buffer to a blocking channel wil...

@headius@mastodon.social

Here's a nasty NIO gotcha: passing a large heap buffer to a blocking channel will copy the entire buffer to native, even if the write only consumes a small part of it. Subsequent writes will continue to copy everything while the channel takes little bites of data. Set a limit to only copy reasonably-sized chunks:

github.com/jruby/jruby/pull/98