-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: animationAnimation APIsAnimation APIsc: performanceRelates to speed or footprint issues (see "perf:" labels)Relates to speed or footprint issues (see "perf:" labels)f: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.found in release: 2.10Found to occur in 2.10Found to occur in 2.10found in release: 2.13Found to occur in 2.13Found to occur in 2.13frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onteam-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team
Description
When I try to use a list of 14216 maps, this widget freezes for a few seconds during initialization:
class Slow extends StatefulWidget {
Slow({Key key}) : super(key: key);
@override
_SlowState createState() => _SlowState();
}
class _SlowState extends State<Slow> {
List _list = [
{
"code": "110000000",
"region": "11",
"district": "0",
"locality_center": "0",
"locality": "0",
"ru_name": "Акмолинская область",
"kk_name": "Ақмола облысы"
},
// 14215 maps
];
@override
Widget build(BuildContext context) {
print('it takes a few seconds before this message is printed in terminal');
print(_list.length);
return Container();
}
}
Is there a better way of storing and using huge lists in flutter?
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work lista: animationAnimation APIsAnimation APIsc: performanceRelates to speed or footprint issues (see "perf:" labels)Relates to speed or footprint issues (see "perf:" labels)f: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.found in release: 2.10Found to occur in 2.10Found to occur in 2.10found in release: 2.13Found to occur in 2.13Found to occur in 2.13frameworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onThe issue has been confirmed reproducible and is ready to work onteam-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team