Repository: flutter
Issue: Flutter app is missing frames/janky
Labels: engine,c: performance,f: scrolling,perf: speed,P2,team-engine,triaged-engine

## Details

Flutter apps in general tend to drop fps/jank on my Redmi Note 5. I created an example in which it's clearly visible, though similar "random" janks happen all the time for me. I did my best to optimize everything I could have imagine in my apps, but it's still janking. It seems that it's something related to GPU rasterization which unexpectedly takes too long sometimes.

In this example scrolling is dropping frames and sometimes at the end of the simulation janks or position sort of jumps around.
As additional remark I'd like to add that Redmi Note 5 is not a weak device, it gives 60 fps in 3D games and generally is smooth.

**Target Platform:** Android
**Target OS version/browser:** Android 9
**Devices:** Redmi Note 5

## Attachments

* https://youtu.be/Y_OqNEhHbsQ - this first video is app running in release mode
* https://youtu.be/Lm06LgTKt3o - this video is scrolling in Telegram (native app), to demonstrate that this is Flutter specific issue
* https://youtu.be/ZKhvGY1DNNA - this video is from profile mode run from which the trace file was extracted

Trace file [trace.zip](https://github.com/flutter/flutter/files/6407487/trace.zip)

Reproducible https://github.com/nt4f04unds-archive/issues/tree/flutter_81563

## Logs

<details>
<summary>Logs</summary>

```
Analyzing issues...                                                     
No issues found! (ran in 7.5s)
```

```
[√] Flutter (Channel sweyer, 2.2.0-11.0.pre.158, on Microsoft Windows [Version 10.0.19041.928], locale ru-RU)
    • Flutter version 2.2.0-11.0.pre.158 at c:\dev\src\flutter
    • Upstream repository git@github.com:nt4f04und/flutter.git
    • Framework revision 1a5a05b7ae (4 weeks ago), 2021-04-06 05:14:02 +0800
    • Engine revision e3832e14b4
    • Dart version 2.14.0 (build 2.14.0-8.0.dev)

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at C:\Users\danya\AppData\Local\Android\sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.7.7)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    • Visual Studio Community 2019 version 16.7.30621.155
    • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 4.1.0)
    • 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 1.8.0_242-release-1644-b01)

[√] IntelliJ IDEA Community Edition (version 2020.3)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.3.3
    • 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.55.2)
    • VS Code at C:\Users\danya\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.21.0

[√] Connected device (4 available)
    • Redmi Note 5 (mobile) • 40c9f14 • android-arm64  • Android 9 (API 28)
    • Windows (desktop)     • windows • windows-x64    • Microsoft Windows [Version 10.0.19041.928]
    • Chrome (web)          • chrome  • web-javascript • Google Chrome 90.0.4430.93
    • Edge (web)            • edge    • web-javascript • Microsoft Edge 90.0.818.46

• No issues found!
```

</details>