ProtoRPC: has the field number an impact on performances?

35 views
Skip to first unread message

Ivo Bellin Salarin

unread,
Mar 17, 2017, 10:26:50 AM3/17/17
to Google App Engine

Hi all,

When implementing a Message class, with one or more fields, we must type a unique number for each field (see the doc)
I can find somewhere in the code the limits for these numbers (even if I have been unable to find them in the documentation main page)

But, do these numbers have an impact on the length of the message, thus on the performance of the exchanges? I remember having seen some documentation about the encoding of those numbers on the wire, but I am unable to find it anymore. Has this question sense in the context of the GAE standard, python runtime? :-)

Thanks in advance,
Ivo BS

Alex (Cloud Platform Support)

unread,
Mar 20, 2017, 6:18:26 PM3/20/17
to Google App Engine

Hi Ivo,


Before proceeding any further, can you confirm that your question is concerned with “unique numbered tags”? If it is the case, you may be interested to learn more about them on this Assigning Tags section of the Protocol Buffers Language Guide.

As part of the recommendations, it is advised to assign tags 1 to 15 to very frequently occurring message elements as they would take one byte to encode. Therefore, it is reasonable to expect these numbers to have an impact on the length of the message, thus on the performance of the exchanges. Also, here is the possible Encoding documentation you were referring to.


Regards,

Alex
Reply all
Reply to author
Forward
0 new messages