During the time it took for us to get everything sorted out for the 0.3.0 release, we accumulated more than enough changes to justify 0.4.0.
There are a ton more changes in this release. (You can find the full summary here.) In addition to the usual bug fixes and performance improvements, there are two really big performance enhancements in the Java library that bear particular discussion.
First, there’s a new TFastFramedTransport. It’s wire-compatible with the regular TFramedTransport, but is about 2.5x times as fast. It accomplishes this by reusing the same write and read buffers over and over, growing them as needed. This can take a real bite out of the CPU footprint of your application, particularly if you have big (or many, many small) deserializations to do.
Second, instead of using byte[] as the underlying data type for binary fields, we’ve switched to using ByteBuffer. The means that we can avoid doing unnecessary byte array allocation and copies during deserialization. This approach is a full 2.5x times faster than the old way, and that’s not even accounting for the reduction in garbage collection time. You’ll definitely have to make some code changes to get the upgrade, but you should still find it worthwhile.
Follow Bryan on Twitter: @bryanduxbury







