> Does this refer to a message containing a single data-block Protobuf bytes type efficiently encodes in wire format as a length (in bytes) and a simple series of byte values, as such, it does not suffer many of the pitfalls of other large data sets. However, in proto json format, note that it is encoded into base64 and back, and thus incurs some penalties there. Best to not stuff too much into a data block. (You can always stream smaller data block pages.)
> or to any message defined in the schema? This best practice guide applies to all messages, and recursively so. In fact, embedded messages are usually even more taxing than a simple flat message, because allocations have to be done for all of the sub messages present. Am Di., 12. Aug. 2025 um 13:57 Uhr schrieb Itamar Katz < [email protected]>: > I read this message: > https://groups.google.com/g/protobuf/c/f-mKyzyeySI/m/Yzn0yywKAgAJ > , but I wonder what is the current best-practice. > > The protocol buffer docs > <https://protobuf.dev/programming-guides/techniques/#large-data>say: > " Protocol Buffers are not designed to handle large messages. As a > general rule of thumb, if you are dealing in messages larger than a > megabyte each, it may be time to consider an alternate strategy." > > Does this refer to a message containing a single data-block (as opposed to > a repeated message), or to any message defined in the schema? > For example, if my schema is: > message Location { > float x = 1; > float y = 2; > float z = 3; > } > message LocationArray { > repeated Location row = 1; > } > message Locations { > repeated LocationArray car = 1; > repeated LocationArray boat = 2; > } > > Does the size limit best-practice refers to each "Location", or the the > whole upper level " Locations"? > > > > -- > 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 view this discussion visit > https://groups.google.com/d/msgid/protobuf/3d383a9e-968b-47af-b43c-a0218c7e6f98n%40googlegroups.com > <https://groups.google.com/d/msgid/protobuf/3d383a9e-968b-47af-b43c-a0218c7e6f98n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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 view this discussion visit https://groups.google.com/d/msgid/protobuf/CAOF_i%2BW%2BSRE2Y19sGsocAv5%2BHz23MKhVxrUYHmtbJVhNnmqqMg%40mail.gmail.com.
