On Thu, Sep 17, 2015 at 11:18 AM, Simon Brandhof <[email protected]> wrote: > What are the side-effects to define wrapper messages as a workaround ? > > message Foo { > Int32 bar = 1; > } > > message Int32 { > int32 value = 1; > } > > In Java it allows to have Foo.hasBar() and Foo.getBar().getValue().
Sub-message involves a lot more encoding overhead, both cpu time (creating objects) as well as larger data encoding (extra tag + length get encoded -- an extra 2 bytes). -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/protobuf. For more options, visit https://groups.google.com/d/optout.
