protoc generator : The code of constructor ... is exceeding the 65535 bytes limit

143 views
Skip to first unread message

ravi kiran tunuguntla

unread,
Jan 5, 2015, 8:09:10 AM1/5/15
to prot...@googlegroups.com
protoc generated code could not be compiled. (as the constructor code has exceeded 65535 bytes limit). What can be done to work around this?
GenericDataRow.proto

Henner Zeller

unread,
Jan 8, 2015, 2:07:07 PM1/8/15
to ravi kiran tunuguntla, Protocol Buffers
On 5 January 2015 at 05:09, ravi kiran tunuguntla <ravio...@gmail.com> wrote:
> protoc generated code could not be compiled. (as the constructor code has
> exceeded 65535 bytes limit). What can be done to work around this?

Use less fields :)

Your protocol buffer looks pretty degenerated using all these fields.
Java classes have a limit in size,
so you'll run into the problem at one point or another.
You might consider putting these attributes in a repeated field.
Or use extensions to better reflect generic data.

It will make your code using the protocol buffer much more readable as well.

-h

>
> --
> 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 protobuf+u...@googlegroups.com.
> To post to this group, send email to prot...@googlegroups.com.
> Visit this group at http://groups.google.com/group/protobuf.
> For more options, visit https://groups.google.com/d/optout.

ravi kiran tunuguntla

unread,
Jan 15, 2015, 1:09:57 PM1/15/15
to prot...@googlegroups.com, ravio...@gmail.com, h.ze...@acm.org
Thanks for the solution. Extensions seems good for our usecase.
Reply all
Reply to author
Forward
0 new messages