-
Notifications
You must be signed in to change notification settings - Fork 29.2k
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: device-specificOnly manifests on certain devicesOnly manifests on certain devicesf: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.perf: speedPerformance issues related to (mostly rendering) speedPerformance issues related to (mostly rendering) speedplatform-iosiOS applications specificallyiOS applications specificallyplatform-webWeb applications specificallyWeb applications specificallyteam-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team
Description
Details
Running web app in release mode on iOS is very slow. It seems there're no real 120fps. On Android everything is okay.
Canvas flag or any other improvements haven't any effect.
Target Platform: web
Target OS version/browser: iOS 16.2/Chrome 108.0.5359.112
Devices: iPhone 13 Pro Max
Code & Logs
Code
import 'package:flutter/material.dart';
class RegPage extends StatefulWidget {
const RegPage({super.key});
@override
State createState() => _RegPage();
}
class _RegPage extends State<RegPage> with WidgetsBindingObserver {
List items = List<ListItem>.generate(
1000,
(i) => i % 6 == 0
? HeadingItem('Heading $i')
: MessageItem('Sender $i', i.toString()),
);
@override
void initState() {
super.initState();
}
@override
void dispose() {
super.dispose();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: null,
body: ListView.builder(
primary: false,
scrollDirection: Axis.vertical,
shrinkWrap: true,
itemExtent: 80,
itemCount: items.length,
itemBuilder: (context, index) {
final item = items[index];
return ListTile(
title: item.buildTitle(context),
subtitle: item.buildSubtitle(context),
);
},
),
);
}
}
abstract class ListItem {
Widget buildTitle(BuildContext context);
Widget buildSubtitle(BuildContext context);
}
class HeadingItem implements ListItem {
final String heading;
HeadingItem(this.heading);
@override
Widget buildTitle(BuildContext context) {
return Text(
heading,
style: Theme.of(context).textTheme.headline5,
);
}
@override
Widget buildSubtitle(BuildContext context) => const SizedBox.shrink();
}
class MessageItem implements ListItem {
final String sender;
final String uri;
MessageItem(this.sender, this.uri);
@override
Widget buildTitle(BuildContext context) => Text(sender);
@override
Widget buildSubtitle(BuildContext context) =>
Image.network('https://picsum.photos/250?image=$uri');
}
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.3.10, on macOS 13.1 22C65 darwin-arm, locale ru-FR)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.3)
[✓] VS Code (version 1.74.2)
[✓] Connected device (2 available)
[✓] HTTP Host Availability
• No issues found!
shprotru, kraa, akashgurava, abdalmonem, likwifi and 5 more
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: device-specificOnly manifests on certain devicesOnly manifests on certain devicesf: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.perf: speedPerformance issues related to (mostly rendering) speedPerformance issues related to (mostly rendering) speedplatform-iosiOS applications specificallyiOS applications specificallyplatform-webWeb applications specificallyWeb applications specificallyteam-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team