protobuf-ruby/beefcake — pull request #44 by bkerley (2014-01-08 19:17:07+00:00)
Title: Create fewer strings during decoding

In https://github.com/basho/riak-ruby-client/issues/133 , we're seeing somewhat insane memory usage when decoding large buffers with beefcake. This issue is caused by repeatedly `split!`ting a long `String`, which, in JRuby, creates a massive number of linked strings that won't be separately garbage collected. This patch uses a cursor to replace the string allocation with integer addition.