google protobuf maximum size

前端 未结 2 650
太阳男子
太阳男子 2020-12-10 10:58

I have some repeating elements in my protobuf message. At runtime the length of the message could be anything - I see some questions already asked like this one - [1]: Max

2条回答
  •  借酒劲吻你
    2020-12-10 11:32

    1. I don't think the protobuf compiler will ever complain about message sizes. Atleast not until you get to the 18 exabyte maximum of uint64_t.

    2. For most implementations, performance starts to suffer at the point where the message cannot fit into RAM at once. So 10 MB should be fine, 10 GB not. Another possible issue is if you don't need all of the data - protobuf does not support random access, so you need to decode the whole message even if you only need a part of it.

提交回复
热议问题