dustin/java-memcached-client — pull request #24 by tootedom (2014-05-25 13:33:16+00:00)
Title: + reduce memory use of GETs when using binary protocol

Hi,

I noticed that a byte[] array of the size of the content fetched from memcached is created for every GET that is successful, in order to represent a errorMsg. This results in a lot of memory allocations, that are subsequently not used.

This PR removes the byte[] allocation in the SUCCESS scenario, removing allocation pressure. The below screen shots are from a JMC view of a flight recorder profile showing the removal of GB's of allocations from a load test that simulates 760,000 gets for 26k of content stored in memcached. Removing the allocations, allowed another 70k of requests to be generated by the load test.

- BEFORE
![screen shot 2014-05-25 at 13 17 19](https://cloud.githubusercontent.com/assets/211070/3077060/6cf2f512-e410-11e3-968a-ff310b1317ed.png)

- AFTER
![screen shot 2014-05-25 at 14 05 23](https://cloud.githubusercontent.com/assets/211070/3077063/78a54018-e410-11e3-8312-7118bb759de7.png)