Repository navigation
--shrink --tree-shake-icons causes huge system load, causing CI Runners to fail #55370
Description
My setup:
- My CI Gitlab CI, using a Mac Mini as Runner to run the flutter builds
- I want to build release artifacts with
--tree-shake-iconsand--shrink
Starting a build with --tree-shake-icons --shrink causes a huge load on my system.
If run it on my local workstation, I get load averages like this (from uptime): (load averages: 397.06 239.44 116.03 ! ).
On the build machine, I cannot get load averages easily as that my ssh session freezes when the build is running.
The system gets unresponsive during the build because of that.
On the CI, this causes my builds to fail because the CI server thinks that the Runners crashed (My guess is that there is some ping mechanism that fails because of the huge load that the flutter builds cause).
I think it would be nice if there were a build option like --low-resource-mode, that would take longer to finish the build, but cause lower strain on the system during the build (e.g. by spawning fewer threads or using a lower priority), making sure the system stays responsive during the build.
./flutterw doctor -v
[✓] Flutter (Channel beta, v1.17.0, on Mac OS X 10.15.4 19E287, locale en-GB)
• Flutter version 1.17.0 at /Users/kami/diagnosia/neocortex-mobile/.flutter
• Framework revision d3ed9ec945 (2 weeks ago), 2020-04-06 14:07:34 -0700
• Engine revision c9506cb8e9
• Dart version 2.8.0 (build 2.8.0-dev.18.0 eea9717938)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /Users/kami/Library/Android/sdk
• Platform android-29, build-tools 29.0.2
• ANDROID_HOME = /Users/kami/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.4.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.4.1, Build version 11E503a
• CocoaPods version 1.8.4
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 3.6)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 45.1.1
• Dart plugin version 192.7761
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
[!] IntelliJ IDEA Ultimate Edition (version 2019.1.2)
• IntelliJ at /Applications/IntelliJ IDEA.app
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• For information about installing plugins, see
https://flutter.dev/intellij-setup/#installing-the-plugins
[✓] VS Code (version 1.44.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.9.1
Activity
jonahwilliams commentedon Apr 22, 2020
This is being fixed in #54923
jonahwilliams commentedon Apr 23, 2020
Re-opening due to revert
github-actions commentedon Aug 21, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.