Skip to content

Scroll performance significantly degraded on iPhone X, Xs devices due to irregular input events delivery. #31086

@wemped

Description

@wemped

Myself and some others discussing in #22314 have noticed significant scroll performance issues on iPhone X,Xs devices with scrolling views.

Anecdotally it seems drag gestures are the main issue, while flings seem slightly better.
@coreysprague suggested it may be because these devices have a 120hz gesture sample rate (https://www.macworld.com/article/3235709/iphone-x-samples-touch-input-at-120hz-for-faster-smoother-response.html).

Just want to clarify that this does happen even when running in release mode.

Steps to Reproduce

Here's a tiny sample app where you can reproduce the scroll jitters and frame skips, just grab an iPhone X,Xs and run in release mode.

import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    const padding = EdgeInsets.symmetric(vertical: 10, horizontal: 10);

    return MaterialApp(
      home: Scaffold(
        body: ListView(
          children: <Widget>[
            Container(
              margin: padding,
              height: 200,
              color: Colors.grey,
            ),
            Container(
              margin: padding,
              height: 200,
              color: Colors.orange,
            ),
            Container(
              margin: padding,
              height: 200,
              color: Colors.grey,
            ),
            Container(
              margin: padding,
              height: 200,
              color: Colors.orange,
            ),
            Container(
              margin: padding,
              height: 200,
              color: Colors.grey,
            ),
            Container(
              margin: padding,
              height: 200,
              color: Colors.orange,
            ),
            Container(
              margin: padding,
              height: 200,
              color: Colors.grey,
            ),
            Container(
              margin: padding,
              height: 200,
              color: Colors.orange,
            ),
          ],
        ),
      ),
    );
  }
}

Logs

No errors in logs w/ flutter run --verbose

No issued found w/ flutter analyze

[✓] Flutter (Channel stable, v1.2.1, on Mac OS X 10.14.4 18E226, locale en-US)
• Flutter version 1.2.1 at /Users/dwempe/flutter
• Framework revision 8661d8a (8 weeks ago), 2019-02-14 19:19:53 -0800
• Engine revision 3757390
• Dart version 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/dwempe/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• Java binary at: /Applications/Android Studio 2.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
• All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.2, Build version 10E125
• ios-deploy 1.9.4
• CocoaPods version 1.5.3

[✓] Android Studio (version 3.3)
• Android Studio at /Applications/Android Studio 2.app/Contents
• Flutter plugin version 34.0.1
• Dart plugin version 182.5215
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)

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

[✓] Connected device (2 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 8.0.0 (API 26)
(emulator)
• _________ iPhone • 00008020-000B25CE0298002E • ios • iOS 12.2

Metadata

Metadata

Assignees

Labels

a: annoyanceRepeatedly frustrating issues with non-experimental functionalityc: performanceRelates to speed or footprint issues (see "perf:" labels)customer: crowdAffects or could affect many people, though not necessarily a specific customer.e: device-specificOnly manifests on certain devicesengineflutter/engine related. See also e: labels.f: scrollingViewports, list views, slivers, etc.platform-iosiOS applications specifically

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions