Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Counter sample app uses high memory on Windows in release mode #148641

Open
escamoteur opened this issue May 19, 2024 · 3 comments
Open

Counter sample app uses high memory on Windows in release mode #148641

escamoteur opened this issue May 19, 2024 · 3 comments
Labels
a: desktop Running on desktop found in release: 3.22 Found to occur in 3.22 has reproducible steps The issue has been confirmed reproducible and is ready to work on perf: memory Performance issues related to memory platform-windows Building on or for Windows specifically team-desktop Owned by Desktop platforms team

Comments

@escamoteur
Copy link
Contributor

Steps to reproduce

I checked this following up on a stack overflow question on how much memory a Flutter App uses and was surprised too that it take sso much. The App+the runtime dll is about 18MBs but the running app uses 18-33MB. Which seems quite a lot for such a simple app.

grafik

Code sample

Code sample
[Paste your code here]

What target platforms are you seeing this bug on?

Windows

OS/Browser name and version | Device information

windows 10 on AMD 64 Bit

Does the problem occur on emulator/simulator as well as on physical devices?

No

Logs

No response

Flutter Doctor output

Doctor output
[√] Flutter (Channel stable, 3.13.2, on Microsoft Windows [Version 10.0.19045.4412], locale de-DE)
    • Flutter version 3.13.2 on channel stable at C:\Entwicklung\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ff5b5b5fa6 (9 months ago), 2023-08-24 08:12:28 -0500
    • Engine revision b20183e040
    • Dart version 3.1.0
    • DevTools version 2.25.0

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at C:\Users\escam\AppData\Local\Android\sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-10027231)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.7.3)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.7.34024.191
    • Windows 10 SDK version 10.0.22621.0

[√] Android Studio (version 2022.3)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-10027231)

[√] VS Code (version 1.89.1)
    • VS Code at C:\Users\escam\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.88.0

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.19045.4412]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 124.0.6367.207
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 120.0.2210.133

[√] Network resources
    • All expected network resources are available.
</details>
@escamoteur escamoteur added the from: performance template Issues created via a performance issue template label May 19, 2024
@escamoteur escamoteur changed the title Why does the Counter Sample use 10MBs of Memory on Windows in releass Mode Why does the Counter Sample use 10MBs of Memory on Windows in release Mode May 19, 2024
@jonahwilliams jonahwilliams removed the from: performance template Issues created via a performance issue template label May 19, 2024
@huycozy huycozy added the in triage Presently being triaged by the triage team label May 20, 2024
@huycozy
Copy link
Member

huycozy commented May 20, 2024

Checking this on my end, I see it's around 24-29 MB when running the app in release mode. dart.exe is around 80-90 MB.

flutter doctor -v (stable & master)
[√] Flutter (Channel stable, 3.22.0, on Microsoft Windows [Version 10.0.19045.4291], locale en-US)
    • Flutter version 3.22.0 on channel stable at C:\WIP\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 5dcb86f68f (11 days ago), 2024-05-09 07:39:20 -0500
    • Engine revision f6344b75dc
    • Dart version 3.4.0
    • DevTools version 2.34.3

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at C:\AndroidSDK
    • Platform android-34, build-tools 34.0.0
    • Java binary at: C:\Program Files\Android\Android Studio Hedgehog\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-b2043.56-10550314)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.4.4)
    • Visual Studio at D:\DOWNLOADWORK\VS2022
    • Visual Studio Community 2022 version 17.4.33213.308
    • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 2022.3)
    • Android Studio at C:\Program Files\Android\Android StudioGiraffe
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-10027231)

[√] Android Studio (version 2023.1)
    • Android Studio at C:\Program Files\Android\Android Studio Hedgehog
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-b2043.56-10550314)

[√] VS Code (version 1.88.0)
    • VS Code at C:\Users\ADMIN\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.88.0

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.19045.4291]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 124.0.6367.208
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 124.0.2478.67

[√] Network resources
    • All expected network resources are available.

• No issues found!
[!] Flutter (Channel master, 3.22.0-36.0.pre.56, on Microsoft Windows [Version 10.0.19045.4291], locale en-US)
    • Flutter version 3.22.0-36.0.pre.56 on channel master at C:\WIP\flutter_master
    ! Warning: `flutter` on your path resolves to C:\WIP\flutter\bin\flutter, which is not inside your current Flutter SDK checkout at C:\WIP\flutter_master.
      Consider adding C:\WIP\flutter_master\bin to the front of your path.
    ! Warning: `dart` on your path resolves to C:\WIP\flutter\bin\dart, which is not inside your current Flutter SDK checkout at C:\WIP\flutter_master.
      Consider adding C:\WIP\flutter_master\bin to the front of your path.
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 6067d8f219 (2 hours ago), 2024-05-20 12:00:40 +0200
    • Engine revision c6fecf65fb
    • Dart version 3.5.0 (build 3.5.0-169.0.dev)
    • DevTools version 2.36.0-dev.10
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at C:\AndroidSDK
    • Platform android-34, build-tools 34.0.0
    • Java binary at: C:\Program Files\Android\Android Studio Hedgehog\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-b2043.56-10550314)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.4.4)
    • Visual Studio at D:\DOWNLOADWORK\VS2022
    • Visual Studio Community 2022 version 17.4.33213.308
    • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 2022.3)
    • Android Studio at C:\Program Files\Android\Android StudioGiraffe
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.6+0-b2043.56-10027231)

[√] Android Studio (version 2023.1)
    • Android Studio at C:\Program Files\Android\Android Studio Hedgehog
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-b2043.56-10550314)

[√] VS Code (version 1.88.0)
    • VS Code at C:\Users\ADMIN\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.88.0

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.19045.4291]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 124.0.6367.208
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 124.0.2478.67

[√] Network resources
    • All expected network resources are available.

! Doctor found issues in 1 category.

@huycozy huycozy added platform-windows Building on or for Windows specifically a: desktop Running on desktop perf: memory Performance issues related to memory has reproducible steps The issue has been confirmed reproducible and is ready to work on team-desktop Owned by Desktop platforms team found in release: 3.22 Found to occur in 3.22 and removed in triage Presently being triaged by the triage team labels May 20, 2024
@huycozy huycozy changed the title Why does the Counter Sample use 10MBs of Memory on Windows in release Mode Counter sample app uses high memory on Windows in release mode May 20, 2024
@escamoteur
Copy link
Contributor Author

@huycozy is dart.exe part of the release apps process?

@huycozy
Copy link
Member

huycozy commented May 20, 2024

Sorry, I was thinking of #94147 when checking it. Updated my comment to keep this issue separate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: desktop Running on desktop found in release: 3.22 Found to occur in 3.22 has reproducible steps The issue has been confirmed reproducible and is ready to work on perf: memory Performance issues related to memory platform-windows Building on or for Windows specifically team-desktop Owned by Desktop platforms team
Projects
None yet
Development

No branches or pull requests

3 participants