• 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
..
src Loading commit data...
executable.dart Loading commit data...
runner.dart Loading commit data...