Repository navigation
Open
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: performanceRelates to speed or footprint issues (see "perf:" labels)Relates to speed or footprint issues (see "perf:" labels)e: impellerImpeller rendering backend issues and features requestsImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.perf: energyPerformance issues related to energy use (power, watts)Performance issues related to energy use (power, watts)team-engineOwned by Engine teamOwned by Engine teamtriaged-engineTriaged by Engine teamTriaged by Engine team
Description
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

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

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.

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.
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listc: performanceRelates to speed or footprint issues (see "perf:" labels)Relates to speed or footprint issues (see "perf:" labels)e: impellerImpeller rendering backend issues and features requestsImpeller rendering backend issues and features requestsengineflutter/engine related. See also e: labels.flutter/engine related. See also e: labels.perf: energyPerformance issues related to energy use (power, watts)Performance issues related to energy use (power, watts)team-engineOwned by Engine teamOwned by Engine teamtriaged-engineTriaged by Engine teamTriaged by Engine team


Activity
LennoxGong commentedon Oct 14, 2024
The duration of "Waiting for GPU completion"



3.22
1.skia+opengles(engine 3.22)
2.impeller + vulkan(engine 3.22)
3.impeller + opengles(engine 3.22)
3.24

1.skia+opengles
2.impeller+vulkan

[-][Impeller] Impeller performs worse than skia in POWER consumption.[/-][+][Impeller] Impeller performs worse than skia in power consumption.[/+]jonahwilliams commentedon Oct 14, 2024
@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?
LennoxGong commentedon Oct 14, 2024
Scrolling through the page. I will try to upload the apks here after a while.
jonahwilliams commentedon Oct 14, 2024
If that is the source code for the app, that is fine. I'm not going to download an APK off of the internet :)
LennoxGong commentedon Oct 14, 2024
Screenrecorder-2024-10-14-11-00-36-877.mp4
LennoxGong commentedon Oct 14, 2024
That is the source code.
darshankawar commentedon Oct 14, 2024
@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.
LennoxGong commentedon Oct 14, 2024
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)
LennoxGong commentedon Oct 14, 2024
Similar to this

17 remaining items
jonahwilliams commentedon Oct 15, 2024
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:
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?
[-][Impeller] Impeller performs worse than skia in power consumption.[/-][+][Impeller] Impeller performs worse than skia in power consumption 5%.[/+]jonahwilliams commentedon Oct 15, 2024
We also have a powerlab apparently!
LennoxGong commentedon Oct 16, 2024
Is flutter-wonderous-app okay? I will do some related tests on it today.
jonahwilliams commentedon Oct 16, 2024
Yeah that is the one! Much appreciated 😊
LennoxGong commentedon Oct 23, 2024
I got the data from the test engineer today.

(Channel master, 3.27.0-1.0.pre.205)
Jiangfeng0923 commentedon Nov 9, 2024
Is there any new progress on this question? @jonahwilliams