Skip to content

[iOS][animation]: swipe-to-pop-navigator animation is janky #97998

@linhewinner

Description

@linhewinner

Details

This is the code. A very simple list view
https://gist.github.com/linhewinner/7868481e512780ba793775bb818b871f

This is a demonstration of the jank. As you can see "Demo Details 1" is janky while "Demo Details 0" is not janky:
https://user-images.githubusercontent.com/97132583/152900793-28d7ee27-a18c-4dcd-bdb4-2a399caf27eb.MP4

When the jank happens, DevTools Profiler is well under 8ms every frame.

The weird thing is that if you put a CircularProgressIndicator in the view hierarchy, the jank goes away.
I also experimented with replacing the CircularProgressIndicator with a StatefulComponent that just updates itself every 16ms. That also fixes the jank.

I switched to flutter master, and see the exact same behavior.

Target Platform: iOS
Target OS version/browser: iOS 14
Devices: iPhone 13 Pro

Logs

Logs
Analyzing [REDACTED]...                                            
No issues found! (ran in 3.5s)
linhe@/Users/linhe/[REDACTED] flutter doctor -v
[✓] Flutter (Channel stable, 2.8.1, on macOS 12.1 21C52 darwin-x64, locale en-US)
    • Flutter version 2.8.1 at /Users/linhe/development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 77d935af4d (8 weeks ago), 2021-12-16 08:37:33 -0800
    • Engine revision 890a5fca2e
    • Dart version 2.15.1

[✓] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    • Android SDK at /Users/linhe/Library/Android/sdk
    • Platform android-32, build-tools 32.1.0-rc1
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • 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 11.0.11+0-b60-7590822)

[✓] VS Code (version 1.64.0)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.34.0

[✓] Connected device (3 available)
    • Lin’s iPhone (mobile) • 00008110-0002393C3E7A801E            • ios            • iOS 15.2.1 19C63
    • iPhone 13 (mobile)    • F291AF0C-5B8C-434C-955E-A08AB84C3786 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-15-2 (simulator)
    • Chrome (web)          • chrome                               • web-javascript • Google Chrome 98.0.4758.80

• No issues found!

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work lista: animationAnimation APIsc: performanceRelates to speed or footprint issues (see "perf:" labels)f: routesNavigator, Router, and related APIs.frameworkflutter/packages/flutter repository. See also f: labels.platform-iosiOS applications specificallyr: fixedIssue is closed as already fixed in a newer version

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions