Use hash maps in `OneOf` and `MessageCodec`, to support sparse codecs
When decoding these, we allocate arrays with each element holding a codec for the respective field number. If field numbers are sparse, e.g.
oneOf(Left := 1, Right := 9999)
then large arrays are generated. This particular example is causing us to run out heap space.
Use a hash map instead.
-
OneOf
-
MessageCodec