You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's no question that the current implementation of protobufs is geared towards server environments with large amounts of memory. This issue proposes the addition of a build mode (perhaps controlled by a build tag) that optimizes for a constrained environment with low memory availability, a small footprint for binary size, or both.
Challenges:
The dynamic creation of table-driven serializers does incur quite a bit of memory overhead. Fortunately, it's based on a per-use basis.
The protobuf language has a large set of features and the runtime supports all of them. For example, a user of proto3 only does not care about extensions, but extensions support has quite a lot of complexity.
The runtime provides a large degree of backwards compatibility with messages that have not been regenerated in a long time. This is runtime support that costs binary size and will not matter for users that have sufficiently updated messages.
We (LinuxBoot / u-root / go/nerf) would also really appreciate this, in terms of small binary size footprint (we have no such memory constraints). We use protos and gRPC in environments that need to compress to < 4-6MB, and gRPC and protos are one of the larger components of that. It currently works out, but I'm worried about that changing in the future.
There's no question that the current implementation of protobufs is geared towards server environments with large amounts of memory. This issue proposes the addition of a build mode (perhaps controlled by a build tag) that optimizes for a constrained environment with low memory availability, a small footprint for binary size, or both.
Challenges:
\cc @neild @bradfitz
The text was updated successfully, but these errors were encountered: