envoyproxy / envoyproxy/envoy-mobile
protos: compile out unnecessary protos
- Dominant language
- Java
- Stars
- 566
- Forks
- 85
- PR merge metrics
- No merged PRs in 30d
Description
I noticed from object file analysis that compiled protos make up the biggest percentage of binary size:
```
27.7% 2.32Mi 27.8% 2.36Mi compiled protos
```
More importantly, there are a lot of protos that are not _needed_ in Envoy Mobile:
```
2.4% 57.0Ki 2.4% 58.1Ki bazel-out/aarch64-opt/bin/external/envoy_api/envoy/admin/v2alpha/config_dump.pb.cc
```
However, upstream Envoy compiles all of these in, mostly because they are all needed in the server's bootstrap code. Given the size, it is worth it to investigate ways to compile out unnecessary protos. Or better yet, link in protos on-demand.
### Size Win
This entirely depends on what protos we end up needing to link in, but the ceiling is ~2mb.
Contributor guide
Assessment
This issue has not been assessed yet.