msgpack-java icon indicating copy to clipboard operation
msgpack-java copied to clipboard

Improve memory usage via reuse InputStreamBufferInput

Open koo-taejin opened this issue 2 years ago • 9 comments

I am testing to use MsgPack instead of Jackson in Spring. It was confirmed that MsgPack consumes more memory than Jackson.

I dug into that issue, it was confirmed that a lot of memory is created when creating InputStreamBufferInput. So I have make code very similar to the previous reuse form.

After the change, I had confirmed that the memory usage was greatly reduced, and the slope of the heap memory was also changed to be very stable.

I didn't add a test because I don't know whether you merge the code or not, but if you are going to accept it, I'll add a simple test code.

  • as-is msgpack as-is

  • to-be msgpack to be

Thanks :)

koo-taejin avatar Nov 16 '22 14:11 koo-taejin