upvote
I think the overhead is protobuf itself but I can't check.
reply
Comparing a wrapped C++ gRPC backed stack with an httpx/requests backed one is like comparing apples to elephants.
reply
Protobuf simply encode things way more efficient that JSON can define a single object. You're quite frankly spewing bullshit in this whole thread.
reply
You don’t get what they say. It’s not about about how efficient it is after encode, it’s about how fast encode is. They are not spewing bs, they’re focusing on a single point. The question is: do you send it over the wite more often than performing encode/decode.
reply
That's what the person you replied to is talking about, and they're right. Putting aside the final byte size (where protobuf also wins), protobuf is faster at both encoding and decoding than json. There are numerous benchmarks you can find that show this.

The advantages of json are not related to performance.

reply
reply
If you're writing JS you cannot beat JSON.parse, because you're running the most optimized C++ implementation of JSON which will outcompete any decoder written JS itself.

Which is not a very generalizable situation.

reply