Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

size: optimizations for dynamic library #2049

Merged
merged 3 commits into from
Feb 18, 2022
Merged

Conversation

Reflejo
Copy link
Contributor

@Reflejo Reflejo commented Feb 10, 2022

These are the different low hanging fruit fixes to reduce the dynamic library size. Note wins were calculated in isolation against a fixed target for just one architecture so they are not necesarily additive.

For the measured case (a few months back) the size reduction accounted for about -46.2%

This PR is better reviewed commit by commit.

@Reflejo Reflejo changed the title Fz/size size: Reduce size of dynamic library Feb 10, 2022
@Reflejo Reflejo changed the title size: Reduce size of dynamic library size: optimizations for dynamic library Feb 10, 2022
buildbreaker
buildbreaker previously approved these changes Feb 10, 2022
WORKSPACE Outdated Show resolved Hide resolved
@alyssawilk
Copy link
Contributor

optional, but I think this one is worth a release note!

buildbreaker
buildbreaker previously approved these changes Feb 10, 2022
Size delta: -0.66 Mi

Signed-off-by: Martin Conte Mac Donell <reflejo@gmail.com>
The .dynstr section of the binary as well as the symbol table is pretty big
for a shared library with almost no (intended to be) exported symbols. This
change makes all symbols hidden by default. We should test and add to visible
if some are missing.

Size delta: -5.66Mi

Signed-off-by: Martin Conte Mac Donell <reflejo@gmail.com>
This change updates pgv to a version that supports a "cc nop" language. With
that we can make the validation functions a NOP that hopefuly gets inlined.

This is the PGV change for reference: bufbuild/protoc-gen-validate#533

Size delta: -3.7 Mi

Signed-off-by: Martin Conte Mac Donell <reflejo@gmail.com>
@@ -1,5 +1,16 @@
workspace(name = "envoy_mobile")

# TODO[fz]: Remove once envoy updates PGV
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Specifically, any release including this PR: bufbuild/protoc-gen-validate#533

@jpsim jpsim merged commit b0e226d into envoyproxy:main Feb 18, 2022
@Reflejo Reflejo deleted the fz/size branch February 18, 2022 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants