From: "Martin J. Dürst" Date: 2017-09-08T10:47:09+09:00 Subject: [ruby-core:82711] Re: [Ruby trunk Bug#13851] getting "can't modify string; temporarily locked" on non-frozen instances On 2017/09/08 06:11, Eric Wong wrote: > cardoso_tiago@hotmail.com wrote: >> So, after I found that out, I noticed something really >> strange: Using the `IO#read_nonblock(nread, buffer, exception: >> false)` reduces the throughput of my solution significantly >> (it also uses up significantly more memory). When using both >> `IO#read_nonblock(nread, exception: false)` and >> `IO#read_nonblock(nread, buffer)`, I get optimal performance. > > It seems you've figured that out in in [ruby-core:82707], > but I think my earlier note about using thread-local storage > for short-lived buffers still applies. Per-socket buffers > (which you seem to be using) would use more object slots in > common situations. > >> This might be a bit off-topic. Should I open a new ticket with my findings? If it's still relevant, then yes, please. Regards, Martin. Unsubscribe: