Performance loss of getserializedsize() in Java – protocol buffers

Does calling getserializedsize() on a GPB message cause performance degradation before serializing the message using writeto (OutputStream)?

Before writing a message to the output stream, I need to be able to know the size of the message

I use GPB on Java

Solution

No performance loss The second message from this thread on the protobuf mailing list:

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>