Hey folks,
Just curious if there is a current opinion about opportunities to make gRPC a smaller final library - with or without symbols.
Using
bloaty, my C++ server, which uses gRPC, has ~2.4MiB of VM size from it (not including other dependencies, like proto or SSL), and 59.4MB of file size (the difference being debug symbols, if not stripped). While ~2.4MiB doesn't seem too bad, the debug symbols are bit hefty.
I poked around a bit, and I suspect there is some opportunity for additional compile options so more can be dropped at link time. For instance:
- Several types of credentials, even though maybe only a small subset are used. e.g. src/core/lib/security/credentials/external/aws_external_account_credentials.cc uses 32KiB of VM, and 476Ki with symbols. Presumably this only applies for certain users, and not in my case, but is kept during linking since it is not known it won't come up.
- All of the load balancing policies are linked in, even though maybe only a small subset are used. rls/ is 95Ki of VM, 2.7MiB with symbols), outlier detection is 30 KiB of VM, 914KiB with symbols.
And of course, everything is a trade-off - more options means more variations for users and possible confusion.
Thoughts? Are there possible options that folks that could opt-in that could lead to significant reductions to make it worth it?
Thanks!
Kyle