msgpack-java
msgpack-java copied to clipboard
Improve memory usage via reuse InputStreamBufferInput
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
-
to-be
Thanks :)