Reducing the use of intermediate datastructures for the ClusterMessageSerializer