r/FlutterDev • u/Rude_Gate7599 • Oct 12 '26
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 slimmedIf 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.
3
u/Trick-Minimum8593 Oct 12 '26
What changed since last month? https://www.reddit.com/r/FlutterDev/comments/1whtwk1/tired_of_android_emulator_eating_8_gb_of_ram/
2
u/AhmedZNOUDA Oct 12 '26
Dropping memory footprint from 8 GB to ~1.5 GB is massive, especially when running heavy IDEs alongside Gradle. Falling back to CPU rasterization via
lavapipehas caused so many hidden bottlenecks for me before.I see you provided Homebrew and Linux Vulkan instructions—is Windows (DirectX/ANGLE) supported or planned via
go install/ binary release? Theinstall-shimfeature to keep device pickers working in VS Code and Studio is brilliant. Starred the repo!1
u/finxapp Oct 12 '26
What's the impact on the emulated device? Increased lag?
2
u/Few-Bug7095 Oct 12 '26
Sounds interesting
1
u/jaswinprakash 3d ago
will it work on react native?
0
u/nitki_dev Oct 13 '26
I gave up on the emulator and just run on a real phone over USB. It's also the only place where profile mode numbers mean anything.
8
u/[deleted] Oct 12 '26
[removed] — view removed comment
1
u/[deleted] Oct 13 '26
[removed] — view removed comment