Skip to content

[Impeller] Impeller performs worse than skia in power consumption 5%. #156681

Open

Description

@LennoxGong

Steps to reproduce

1.Open the application
2.Slide the page

Catch the capture with Renderdoc
I found that the events of Impeller are more than skia with opengles or vulkan.
skia + opengles
image

impeller + vulkan
image

impeller + opengles
image

By using systrace ,the duration of GPU Completion of Impeller is always more than skia.
image

I have put the power consumption data into a table for reference.
In this demo,as we can see,the power consumption of impeller is always higher than skia.
image

Code sample

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

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    const title = 'scroll list demo';

    return MaterialApp(
      title: title,
      home: Scaffold(
        appBar: AppBar(
          title: const Text(title),
        ),
        body: Container(
          margin: const EdgeInsets.symmetric(vertical: 20),
          height: 2000,
          child: ListView(
            scrollDirection: Axis.vertical,
            children: <Widget>[
              Container(
                height: 200,
                color: Colors.blueAccent,
              ),
              Container(
                height: 200,
                color: Colors.grey,
              ),
              Container(
                height: 200,
                color: Colors.white38,
              ),
              Container(
                height: 200,
                color: Colors.grey,
              ),
              Container(
                height: 200,
                color: Colors.lightBlueAccent,
              ),
              Container(
                height: 200,
                color: Colors.blueAccent,
              ),
              Container(
                height: 200,
                color: Colors.grey,
              ),
              Container(
                height: 200,
                color: Colors.white38,
              ),
              Container(
                height: 200,
                color: Colors.grey,
              ),
              Container(
                height: 200,
                color: Colors.lightBlueAccent,
              ),
            ],
          ),
        ),
      ),
    );
  }
}

What target platforms are you seeing this bug on?

Android

OS/Browser name and version | Device information

Device:Xiaomi 14 8+256G
OS:Xiaomi Hyperos(Android)
Snapdragon qualcomm 8Gen3

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

Unknown

Logs

Logs
[Paste your logs here]

Flutter Doctor output

Doctor output
[✓] Flutter (Channel stable, 3.22.3, on Ubuntu 24.04.1 LTS 6.8.0-45-generic,
    locale zh_CN.UTF-8)
    • Flutter version 3.22.3 on channel stable at
      /home/mi/workspace/devkit/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision b0850beeb2 (3 个月前), 2024-07-16 21:43:41 -0700
    • Engine revision 235db911ba
    • Dart version 3.4.4
    • DevTools version 2.34.3

[!] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    • Android SDK at /home/mi/Android/Sdk
    • Platform android-35, build-tools 35.0.0
    • Java binary at:
      /home/mi/.local/share/JetBrains/Toolbox/apps/android-studio/jbr/bin/java
    • Java version OpenJDK Runtime Environment (build
      17.0.11+0-17.0.11b1207.24-11852314)
    ! Some Android licenses not accepted. To resolve this, run: flutter doctor
      --android-licenses

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✗] Linux toolchain - develop for Linux desktop
    ✗ clang++ is required for Linux development.
      It is likely available from your distribution (e.g.: apt install clang),
      or can be downloaded from https://releases.llvm.org/
    • cmake version 3.28.3
    ✗ ninja is required for Linux development.
      It is likely available from your distribution (e.g.: apt install
      ninja-build), or can be downloaded from
      https://github.com/ninja-build/ninja/releases
    • pkg-config version 1.8.1
    ✗ GTK 3.0 development libraries are required for Linux development.
      They are likely available from your distribution (e.g.: apt install
      libgtk-3-dev)

[✓] Android Studio (version 2024.2)
    • Android Studio at
      /home/mi/.local/share/JetBrains/Toolbox/apps/android-studio
    • Flutter plugin version 81.1.3
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build
      17.0.11+0-17.0.11b1207.24-11852314)

[✓] IntelliJ IDEA Ultimate Edition (version 2024.2)
    • IntelliJ at
      /home/mi/.local/share/JetBrains/Toolbox/apps/intellij-idea-ultimate
    • 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

[✓] VS Code (version 1.93.1)
    • VS Code at /usr/share/code
    • Flutter extension version 3.98.0

[✓] Connected device (3 available)
    • 23127PN0CC (mobile) • 25552ddd • android-arm64  • Android 15 (API 35)
    • Linux (desktop)     • linux    • linux-x64      • Ubuntu 24.04.1 LTS
      6.8.0-45-generic
    • Chrome (web)        • chrome   • web-javascript • Google Chrome
      129.0.6668.70

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

Activity

  1. LennoxGong commented on Oct 14, 2024

    @LennoxGong
    Author

    The duration of "Waiting for GPU completion"
    3.22
    1.skia+opengles(engine 3.22)
    image
    2.impeller + vulkan(engine 3.22)
    image
    3.impeller + opengles(engine 3.22)
    image

    3.24
    1.skia+opengles
    image

    2.impeller+vulkan
    image

  2. changed the title [-][Impeller] Impeller performs worse than skia in POWER consumption.[/-] [+][Impeller] Impeller performs worse than skia in power consumption.[/+] on Oct 14, 2024
  3. jonahwilliams commented on Oct 14, 2024

    @jonahwilliams
    Contributor

    @FridayAutum Renderdoc is not a profiler, its a debugger. Additionally, depending on the mode you run in Impeller will add additional debugging information that is not free.

    GPU completion / power data might be more interested if the results are reproducible. Though the sample app you've shown is so trivial that I suspect any major performance differences have more to do with the swapchain working differently. How are you interacting with the app? just scrolling through it or idling?

  4. LennoxGong commented on Oct 14, 2024

    @LennoxGong
    Author

    Scrolling through the page. I will try to upload the apks here after a while.

  5. jonahwilliams commented on Oct 14, 2024

    @jonahwilliams
    Contributor

    If that is the source code for the app, that is fine. I'm not going to download an APK off of the internet :)

  6. LennoxGong commented on Oct 14, 2024

    @LennoxGong
    Author
    Screenrecorder-2024-10-14-11-00-36-877.mp4
  7. LennoxGong commented on Oct 14, 2024

    @LennoxGong
    Author

    That is the source code.

  8. added
    in triagePresently being triaged by the triage team
    and removed on Oct 14, 2024
  9. darshankawar commented on Oct 14, 2024

    @darshankawar
    Member

    @FridayAutum
    Can you provide how are you measuring the power consumption ?
    I tried to use https://developer.android.com/topic/performance/power/setup-battery-historian but couldn't get any significant information about it while running the code with and without impeller.

  10. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Oct 14, 2024
  11. LennoxGong commented on Oct 14, 2024

    @LennoxGong
    Author

    I got those data by using power monitor, a machine which is used for measuring the power consumption of mobile phone.
    Test Preconditions: Flight mode, lowest brightness, wifi off, Bluetooth off, refresh rate 120hz
    5-minute average current (current waveform is stable without jumps)

  12. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Oct 14, 2024
  13. LennoxGong commented on Oct 14, 2024

    @LennoxGong
    Author

    Similar to this
    image

  14. 17 remaining items

  15. jonahwilliams commented on Oct 15, 2024

    @jonahwilliams
    Contributor

    Thanks @FridayAutum . We'll probably need to do some more investigations into overall power consumption. since the app is quite trivial, I'd expect its one of a few systems:

    1. Swapchain usage / settings
    2. FenceWaiter/ResourceManager threads
    3. Missing optimizations in dispatching.

    We'll probably use android battery stats instead of this particular hardware though.

    Out of curiosity, how does this power usage scale when the app is non-trivial? i.e. something like the wonderous app or flutter/dev/integration_tests/new_gallery?

  16. changed the title [-][Impeller] Impeller performs worse than skia in power consumption.[/-] [+][Impeller] Impeller performs worse than skia in power consumption 5%.[/+] on Oct 15, 2024
  17. jonahwilliams commented on Oct 15, 2024

    @jonahwilliams
    Contributor

    We also have a powerlab apparently!

  18. added
    P2Important issues not at the top of the work list
    on Oct 15, 2024
  19. LennoxGong commented on Oct 16, 2024

    @LennoxGong
    Author

    Is flutter-wonderous-app okay? I will do some related tests on it today.

  20. jonahwilliams commented on Oct 16, 2024

    @jonahwilliams
    Contributor

    Yeah that is the one! Much appreciated 😊

  21. LennoxGong commented on Oct 23, 2024

    @LennoxGong
    Author

    I got the data from the test engineer today.
    (Channel master, 3.27.0-1.0.pre.205)
    1026c870-19a9-4c93-890e-53faeddd9bcf

  22. Jiangfeng0923 commented on Nov 9, 2024

    @Jiangfeng0923

    Is there any new progress on this question? @jonahwilliams

  23. moved this from Needs Triage to Performance in Slimpelleron Jul 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: performanceRelates to speed or footprint issues (see "perf:" labels)e: impellerImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.perf: energyPerformance issues related to energy use (power, watts)team-engineOwned by Engine teamtriaged-engineTriaged by Engine team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions