Earlier quoted context omitted.
You can measure the impact on loading time, and the size of the protobuf implementation you're using probably has an impact on the threshold at which it becomes more efficient. I don't doubt that parsing a 500 character long JSON string is probably faster than loading a protobuf to do it instead. In fact, apparently this JSON parsing trick is only effective beyond 10K or so. But past a certain threshold memory bandwi…
You’re repeatedly missing the point. This is about optimizing startup time. The comparison should be: cost of downloading payload + runtime cost of parsing JSON Vs cost to download protobuf lib + parse and execute JS protobuf lib + download payload + runtime cost of parsing Specifically, the article talks about how parsing JS is more costly than JSON - this cost will apply to the protobuf library which certainly far…
I would suggest reading the links I posted. The minimal protobuf library, which is suitable for working with static decoding, is 6.5KB [1]. Again, you're right that the size of the protobuf library will be an important factor in dictating the scale at which it's more effective than JSON parsing but your sense of the factors is off - a light protobuf library doesn't reach 10kB let alone "far exceeds 10KB".
Furthermore, if your pages use the protobuf library already for other uses like decoding and encoding RPC messages then loading and parsing the protobuf library is basically free - you're going to be doing this anyway.