Normalized APK Size: 37620 bytes (max is 16384 bytes)
Normalized APK Size (arm64): 104304 bytes (max is 6553600 bytes)
(This is not a formal objection)
Why does the binary grow that much?
/Daniel
--
You received this message because you are subscribed to the Google Groups "binary-size" group.
To unsubscribe from this group and stop receiving emails from it, send an email to binary-size...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/binary-size/77f75edf-fd23-41f2-9a43-8ced56d39d2en%40chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/binary-size/ace128e5-e2f7-42b9-9327-a4d943af964dn%40chromium.org.
Andrew,Could you explain a bit more what you are proposing? To make sure we're on the same page: We do not need a global variable in base that holds the variation country (we store that just once in base::FeatureList), but, instead, we need to store for every base::Feature whether it has any country inclusions/exclusions.
Some thoughts/concerns on that:Dynamic initialization is a no-go for variables with static storage duration. Therefore we have two choices:
- Somehow add the country information to features somewhere at run time during browser startup. That seems odd, in particular for features that are defined outside of an embedder.- Have magic codegen that scans the entire codebase and creates a single constexpr map from that, e.g. directly in base. Seems error prone and tricky to get right, e.g. just making sure that you don't encode superfluous country information for features that do not end up getting linked into the specific binary.
Do you have any specific examples/precedents in mind?
In meantime, I'll explore some base::FeatureWithCountryRestriction variants that either inherit from base::Feature or use composition to see whether we can address the binary size concern that way.
On Tue, Jun 16, 2026 at 10:36 AM Jan Keitel <jke...@google.com> wrote:Some thoughts/concerns on that:Dynamic initialization is a no-go for variables with static storage duration. Therefore we have two choices:Why is it a no-go? Chrome has lots of statics that are mutable...
- Somehow add the country information to features somewhere at run time during browser startup. That seems odd, in particular for features that are defined outside of an embedder.- Have magic codegen that scans the entire codebase and creates a single constexpr map from that, e.g. directly in base. Seems error prone and tricky to get right, e.g. just making sure that you don't encode superfluous country information for features that do not end up getting linked into the specific binary.Do you have any specific examples/precedents in mind?I was thinking just have a file similar to field_trial_testing_config.json that could store tha mappings, and codegen from that.