Problem: generated code is too slow

It takes about 3 seconds to send 100K messages from client to server
to client, i.e. 200K messages in total, or 65K / second.

Solution: start by rewriting message codec to reduce use of heap
memory.