r/FlutterDev • u/Rude_Gate7599 • 13h ago
Tooling Built a tool to stop Android emulators eating 8GB RAM during Flutter dev (down to ~1.5GB)
Whenever I'm doing Flutter development on my Mac, running flutter run with Gradle, VS Code/Studio, and an Android emulator quickly pushes a 16GB machine straight into heavy memory swap. In Activity Monitor, qemu-system-aarch64 alone routinely holds 7-8+ GB.
A lot of that RAM usage isn't your app or Android itself:
- Android Studio's emulator often falls back to CPU rasterization (
lavapipe), dumping multiple gigabytes of software render buffers directly into host RAM. - Stock Google system images launch with ~40 background daemons (YouTube, Assistant, wear sync, Play telemetry) you never touch while testing a Flutter build.
I wrote avdslim, an open-source Go CLI with no external dependencies that drops emulator resident memory down to ~1.5 GB:
- Forces
-lowramand native GPU hardware rendering (Apple Metal on Mac, Vulkan/DRI on Linux) to eliminate CPU rendering buffers. - Disables ~45 non-essential guest services via adb.
- Flutter safe: Hot reload, DevTools, network sockets/ports, Firebase Auth, and FCM push notifications are completely unaffected.
- Running
avdslim offcleanly restores every setting and package back to default.
If your machine chokes while running Flutter on Android:
brew tap kdbhalala/avdslim https://github.com/kdbhalala/avdslim.git && brew install avdslim
avdslim tune-avd # adjusts config to 1.5GB + host GPU
avdslim start # boots the emulator slimmed
If you start emulators from Studio or VS Code device picker, avdslim install-shim transparently wraps the SDK binary so it applies automatically.
Code is here if anyone finds it useful: https://github.com/kdbhalala/avdslim
Hope it helps anyone fighting laptop RAM while developing Flutter apps.