Skip to content

Process dart:flutter_tools.snapshot and dart:frontend_server_aot.dart.snapshot consumes huge memory on macOS when flutter run even has stopped #179584

@husainazkas

Description

@husainazkas

Steps to reproduce

  1. Clean process, no dart or flutter process running in the background
  2. Open flutter project with vscode / any other IDE
  3. Run flutter run

Expected results

dart:flutter_tools.snapshot and dart:frontend_server_aot.dart.snapshot processes should not consume huge memory (more that 1GB) or at least after application stopped the consuming memory should be reduced

Actual results

dart:flutter_tools.snapshot is consuming around ±900MB to ±1.36GB, and the dart:frontend_server_aot.dart.snapshot is consuming around ±800MB to ±1.5GB but this process sometimes becomes two processes consuming almost the same amount of memory.

Screenshots or Video

Activity Monitor Image Image

Flutter Doctor output

Output
[✓] Flutter (Channel stable, 3.38.4, on macOS 26.1 25B78 darwin-arm64, locale en-ID) [476ms]
    • Flutter version 3.38.4 on channel stable at /Users/<username>/fvm/versions/stable
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 66dd93f9a2 (5 days ago), 2025-12-03 14:56:10 -0800
    • Engine revision a5cb96369e
    • Dart version 3.10.3
    • DevTools version 2.51.1
    • Feature flags: enable-web, enable-linux-desktop, enable-macos-desktop, enable-windows-desktop, enable-android, enable-ios, cli-animations, enable-native-assets, omit-legacy-version-file, enable-lldb-debugging, enable-uiscene-migration

[✓] Android toolchain - develop for Android devices (Android SDK version 36.0.0) [1,284ms]
    • Android SDK at /Users/<username>/Library/Android/sdk
    • Emulator version 36.2.12.0 (build_id 14214601) (CL:N/A)
    • Platform android-36, build-tools 36.0.0
    • Java binary at: /opt/homebrew/opt/openjdk@17/bin/java
      This JDK is specified in your Flutter configuration.
      To change the current JDK, run: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment Homebrew (build 17.0.17+0)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 26.1.1) [1,262ms]
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 17B100
    • CocoaPods version 1.16.2

[✓] Chrome - develop for the web [4ms]
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Connected device (4 available) [6.5s]
    • iPhone 17 Pro (mobile)             • 8A6EB338-23CC-4A5D-A405-38650C589517 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-26-1 (simulator)
    • macOS (desktop)                    • macos                                • darwin-arm64   • macOS 26.1 25B78 darwin-arm64
    • Chrome (web)                       • chrome                               • web-javascript • Google Chrome 142.0.7444.177

[✓] Network resources [364ms]
    • All expected network resources are available.

• No issues found!

Reproduced on version 3.38.4, MacBook Air M3 with 8GB RAM, macOS 26.1 Tahoe.

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work lista: buildBuilding flutter applications with the toolc: performanceRelates to speed or footprint issues (see "perf:" labels)c: regressionIt was better in the past than it is nowdependency: dartDart team may need to help usfound in release: 3.38Found to occur in 3.38found in release: 3.40Found to occur in 3.40has reproducible stepsThe issue has been confirmed reproducible and is ready to work onperf: memoryPerformance issues related to memoryteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool team

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions