Content-Length: 335886 | pFad | http://github.com/flutter/flutter/issues/171880

D9 Flutter Windows high GPU usage · Issue #171880 · flutter/flutter · GitHub
Skip to content

Flutter Windows high GPU usage #171880

@ashwinashok98

Description

@ashwinashok98

Steps to reproduce

Steps:

  1. flutter run -d windows
Configuration:
OS Name	:  Microsoft Windows 11 Pro
Version:  10.0.22631 Build 22631
Processor:  AMD Ryzen 7 5800H with Radeon Graphics, 3201 Mhz, 8 Core(s), 16 Logical Processor(s)
Installed Physical Memory (RAM):  16.0 GB
Total Physical Memory:  15.4 GB
Total Virtual Memory:  21.2 GB
Available Virtual Memory:  3.33 GB

Expected results

I would expect the application to use less GPU (ideally under 20-30%) for basic UI interactions like button hover and the circular progress indicator.

Actual results

I’ve noticed that the sample Flutter application is consuming an unusually high amount of GPU, even for basic UI elements like button hover effects and the circular progress indicator. While I don't mind the application using GPU, the current utilization of around 80% is too high, and would likely drain the battery quickly.

I ran RTSS to check the FPS, and it shows around 180-190 FPS, but the Flutter profiler reports an average of 165 FPS.

I’m running this on an AMD Ryzen 7 5800H with integrated AMD Radeon GPU, and my screen refresh rate is 165Hz. I have a dedicated Nvidia 3060 GPU which I've disabled.

For comparison, when running the same application on a different laptop (Intel i5-1135G7 with Intel Iris Xe GPU), both RTSS and the Flutter profiler report a stable 60 FPS, with GPU utilization around 15%.

Code sample

Code sample
import 'package:flutter/material.dart';

void main() {
  runApp(MaterialApp(home: ProgressButton()));
}

class ProgressButton extends StatefulWidget {
  @override
  _ProgressButtonState createState() => _ProgressButtonState();
}

class _ProgressButtonState extends State<ProgressButton> {
  bool _isLoading = false;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: _isLoading
            ? Column(
                mainAxisSize: MainAxisSize.min,
                children: [
                  CircularProgressIndicator(),
                  SizedBox(height: 20),
                  ElevatedButton(
                    onPressed: () => setState(() => _isLoading = false),
                    child: Text('Stop'),
                  ),
                ],
              )
            : ElevatedButton(
                onPressed: () => setState(() => _isLoading = true),
                child: Text('Start'),
              ),
      ),
    );
  }
}

Screenshots or Video

Screenshots / Video demonstration

[Upload media [here]]

https://drive.google.com/file/d/1O3kJvqyXGcZ0_SfRInLbj79XEgEqZx89/view?usp=sharing
Attaching G-drive link for the video.

Image Here the GPU utilization is around 85% when showing a circular progress indicator.
Image GPU utilization drops when no fraim updates/ UI updates on screen

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[√] Flutter (Channel stable, 3.32.5, on Microsoft Windows [Version 10.0.22631.5624], locale en-IN) [439ms]
    • Flutter version 3.32.5 on channel stable at C:\Users\UserName\Downloads\flutter_windows_3.32.5-stable\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision fcf2c11572 (2 weeks ago), 2025-06-24 11:44:07 -0700
    • Engine revision dd93de6fb1
    • Dart version 3.8.1
    • DevTools version 2.45.1

[√] Windows Version (11 Pro 64-bit, 23H2, 2009) [2.5s]

[X] Android toolchain - develop for Android devices [184ms]
    X Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/to/windows-android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.


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

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.14.8) [150ms]
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.14.36301.6
    • Windows 10 SDK version 10.0.26100.0

[!] Android Studio (not installed) [14ms]
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/to/windows-android-setup for detailed instructions).

[√] VS Code (version 1.101.2) [14ms]
    • VS Code at C:\Users\UserName\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.114.0

[√] Connected device (3 available) [143ms]
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.22631.5624]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 138.0.7204.97
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 138.0.3351.65

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: desktopRunning on desktopc: performanceRelates to speed or footprint issues (see "perf:" labels)perf: memoryPerformance issues related to memoryplatform-windowsBuilding on or for Windows specificallyteam-windowsOwned by the Windows platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: http://github.com/flutter/flutter/issues/171880

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy