• Michael Goderbauer's avatar
    Remove all service extensions from release mode (#23038) · 8e2ca93f
    Michael Goderbauer authored
    Service extensions can only be activated in debug or profile mode, their code should never be included in release mode. This PR adds guards around all service extension registration calls that enable Dart's tree shaker to remove the extension's code in release mode, which reduces our binary size:
    
    Android Snapshot (uncompressed): minus 127,384 Bytes (-124.40KB)
    APK (compressed): minus 38,136 Bytes (-37.24KB)
    iOS Snapshot (App.framework, uncompressed): 264,304 Bytes(-258.10KB)
    
    For details: https://docs.google.com/document/d/13JlgvliCn5sWwT2K2SfDwD1NhEfxpJH9DCf22gZZru8/edit
    
    **Benchmark Regressions:** This PR may cause benchmarks to regress because it may change the timing of GC. If you notice a benchmark regression **please note down the exact set of benchmarks that regressed on this PR** and then feel free to revert. I will follow-up with a PR that forces a GC before the effected benchmarks run to get a clean baseline before re-applying this PR.
    8e2ca93f
Name
Last commit
Last update
..
bin Loading commit data...
doc Loading commit data...
gradle Loading commit data...
ide_templates/intellij Loading commit data...
lib Loading commit data...
schema Loading commit data...
templates Loading commit data...
test Loading commit data...
tool Loading commit data...
BUILD.gn Loading commit data...
README.md Loading commit data...
analysis_options.yaml Loading commit data...
pubspec.yaml Loading commit data...