3 ms·
JSON parsing IS expensive. Way more expensive than many people realize. There is actually an almost-underground JSON parser SCENE in the .Net ecosystem where pe
by Rapzid 8y ago
JSON parsing IS expensive. Way more expensive than many people realize. There is actually an almost-underground JSON parser SCENE in the .Net ecosystem where people develop new parser and try to squeeze the maximum performance using all sorts of tricks: https://github.com/neuecc/Utf8Json https://github.com/neuecc/Utf8Json . Here there is discussion of needing JSON support in .Net core that's faster than Json.Net: https://github.com/dotnet/announcements/issues/90 https://github.com/dotnet/announcements/issues/90 .
And people say web applications are never CPU bound :)
- NicoJuicy 8y agogRCP is a little bit faster, Google created protobuff which should be easier to migrate to than gRPC, but the protocol is unreadable ( binary)... JSON has its advantages, I prefer a feature flag when I need performance ( protobuff vs Json), http headers do the rest
- stouset 8y agogRPC is built on top of protobuf. It’s literally just RPC with protobufs.
- 0815test 8y ago> JSON parsing IS expensive Well, maybe https://news.ycombinator.com/item?id=19214387 https://news.ycombinator.com/item?id=19214387
- tekknik 8y agoone could argue that if serialization/deserialization is the majority of what your api is spending time on then you’ve got distributed monoliths and shouldn’t be making the call in the first place. also ensuring you have the fastest json parser before having a real problem is premature optimization