Skip to content

Commit 543ba66

Browse files
committed
health: improve MsgPackLite code readability
This commit includes a set of small patches that make MsgPackLite and SQLMsgPackLite classes more understandable and more performant. These patches are: - add a brief javadoc description of the classes; - add extra comments that enlighten MsgPack binary protocol; - replace DataOutputStream.write by DataOutputStream.writeByte that looks more readable. Another positive effect here is to use a not synchronized method that it may improve serialization performance. It is ok because MsgPackLite is stateless and can be shared between multiple threads as well; - avoid to use shortened variables names (i.e. os instead of more meaningful output, outputStream and so on); - increase an initial capacity of a map being de-serialized from the MsgPack map object (by 25% of the original size). It may help to avoid an unnecessary resize operation during the map filling up.
1 parent 213ca31 commit 543ba66

File tree

2 files changed

+201
-82
lines changed

2 files changed

+201
-82
lines changed

0 commit comments

Comments
 (0)