Here are all the tools to help track and debug the disk size of the Flutter engine.
For each commit to flutter/flutter the Chromebots generate treemaps illustrating the sizes of the individual components within release builds of libflutter.so. The treemap is uploaded to Google Cloud Storage and linked from the LUCI console.
To find a treemap for a given commit follow these steps:
Linux linux_android_aot_engine, click on detailsView more details on flutter-dashboard to get access to the LUCI build page (example: https://ci.chromium.org/ui/p/flutter/builders/prod/Linux%20linux_android_aot_engine/17969/overview).launch buildsLinux Production Engine Drone for ci/android_release_arm64, click it (example https://ci.chromium.org/ui/p/flutter/builders/prod/Linux%20Production%20Engine%20Drone/1294317/overview).log links, click the index.html link under it (example: https://storage.googleapis.com/flutter_logs/engine/96fe3b3df509d451116124f0abbd288e36a03805/builder/ff60e5a3-b415-42ae-a7b4-025b1af8ec71/index.html).Treemaps can also be generated locally with the following call:
flutter/ci/binary_size_treemap.sh <path/to/libflutter.so> <output_directory>
In devicelab we run various benchmarks to track the APK/IPA sizes and various (engine) artifacts contained within. These benchmarks run for every commit to flutter/flutter and are visible on our build dashboard. The most relevant benchmarks for engine size are:
flutter_gallery_android__compile/release_size_bytesflutter_gallery_ios__compile/release_size_byteshello_world_android__compile/release_size_byteshello_world_ios__compile/release_size_bytesicudtl.dathello_world_android__compile/icudtl_compressed_byteshello_world_android__compile/icudtl_uncompressed_byteslibflutter.so (release mode)hello_world_android__compile/libflutter_compressed_byteshello_world_android__compile/libflutter_uncompressed_byteshello_world_android__compile/snapshot_compressed_byteshello_world_android__compile/snapshot_uncompressed_bytesA detailed comparison of AOT snapshot sizes can be performed using the instructions documented here.