Peter Christian Fraedrich
1 min readApr 28, 2020

As someone who actively develops in Go I completely understand the allure of using protobufs instead of JSON. However I have to protest that for most applications using protobufs is entirely overkill. Even in your examples with the largest payload sizes the difference in time between JSON and protobuf was only 0.5ms, which is insignificant for all but the highest-demand applications. Additionally, using protobufs instead of JSON introduces additional complexity to your code and to your dev/build/deploy process as you now need to generate the necessary protobuf definitions alongside compiling your application.

Additionally, you’re comparing encoding/json to an optimized third-party package; I would be willing to bet good money that you can make up the performance difference by using an optimized third-party JSON package as well, something like gjson or jettison that’s designed for performance.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Peter Christian Fraedrich
Peter Christian Fraedrich

Written by Peter Christian Fraedrich

Entrepreneur, software developer, writer, musician, amateur luthier, husband, dad. All opinions are my own.

Responses (1)

Write a response

TL; DR; — For smaller application ProtoBufs are overkill.
I totally agree with you, that for smaller applications its ProtoBufs are overkill.
However, in situations when you have 100’s of such small services, ProtoBufs are really nice way to maintain…

--