News for hackers. Stuff that matters.
Re:Cap'n Proto 1.0 by foobiekr on Friday July 28, 2023 @01:09PM (#36909991)
One thing about google proto is that, at least in many languages, every message throws off a ton of garbage that stresses the GC. On the send side, you can obviously re-use objects, but on the receive side no.
Re:Cap'n Proto 1.0 by tignaj on Friday July 28, 2023 @05:10PM (#36913358)
This is also because Google's Protobuf implementations aren't doing a very good job with avoiding unnecessary allocations. Gogoproto is better and it is possible to do even better, here is an example prototype I have put together for Go (even if you do not use the laziness part it is still much faster than Google's implementation): https://github.com/splunk/exp-lazyproto
Re:Cap'n Proto 1.0 by haberman on Friday July 28, 2023 @05:43PM (#36913762)
More and more languages are being built on top of the "upb" C library for protobuf (https://github.com/protocolbuffers/upb) which is designed around arenas to avoid this very problem.

Currently Ruby, PHP, and Python are backed by upb.

Disclosure: I work on the protobuf team, and created the upb library.

Re:Cap'n Proto 1.0 by foobiekr on Friday July 28, 2023 @07:22PM (#36914738)
Agreed but please do something about Go.