Repository navigation
Tableview widget janks execessively with >250k rows #138271
Copy link
Copy link
Closed
flutter/packages
#10738Labels
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)f: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.found in release: 3.13Found to occur in 3.13Found to occur in 3.13found in release: 3.17Found to occur in 3.17Found to occur in 3.17frameworkflutter/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 onp: two_dimensional_scrollablesIssues pertaining to the two_dimensional_scrollables packageIssues pertaining to the two_dimensional_scrollables packagepackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.team-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team
Description
Is there an existing issue for this?
- I have searched the existing issues
- I have read the guide to filing a bug
Steps to reproduce
- Update the example app in the 2d-scrollables package to start with 1.5 million rows by editing
int _rowCount = 1500000; - Run the app
flutter run -d mac --release - Click the "Jump to bottom"
- Attempt to scroll
Expected results
Scroll without janking
Actual results
Getting ~1 frame every 1-2 seconds
Code sample
Update the example app in the 2d-scrollables package to start with 1.5 million rows by editing int _rowCount = 1500000;
Screenshots or Video
Screenshots / Video demonstration
large.row.count.mov
Logs
No response
Flutter Doctor output
Doctor output
[✓] Flutter (Channel stable, 3.13.9, on macOS 14.1 23B74 darwin-arm64, locale
en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[!] Xcode - develop for iOS and macOS (Xcode 15.0.1)
✗ Unable to get list of installed Simulator runtimes.
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.2)
[✓] VS Code (version 1.84.0)
[✓] Connected device (2 available)
[✓] Network resourcesReactions are currently unavailable
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)f: scrollingViewports, list views, slivers, etc.Viewports, list views, slivers, etc.found in release: 3.13Found to occur in 3.13Found to occur in 3.13found in release: 3.17Found to occur in 3.17Found to occur in 3.17frameworkflutter/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 onp: two_dimensional_scrollablesIssues pertaining to the two_dimensional_scrollables packageIssues pertaining to the two_dimensional_scrollables packagepackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.team-frameworkOwned by Framework teamOwned by Framework teamtriaged-frameworkTriaged by Framework teamTriaged by Framework team
Activity
ChuckPG commentedon Nov 11, 2023
Love the package thank you!
I was hopeful that supporting large sets of rows would come with lazy loading nature of the package, as Android or iOS virtualizing views do. However, scrolling performance degrades in the lower rows in the table.
kswoll commentedon Nov 11, 2023
+1 this is a great package!
I notice that when you scroll from the bottom,
_reifyChildrenappears to get called on every animation frame. It has this implementation:If you're at the bottom of a 1.5 million row table,
_leadingYIndexis zero,_trailingYIndexis 1,499,999 and the leading and trailing X values is 0 and 5. (for my table)This means that while scrolling, 100s of millions of iterations of these loops is firing.
huycozy commentedon Nov 13, 2023
Thanks for the report. Reproduced this issue on Android and macOS platforms in profile mode.
After clicking on "Jump to bottom" button, there are a lot of janks:
Janks observation demo video (macOS)
Screen.Recording.2023-11-13.at.12.40.18.mov
Timeline trace json file: dart_devtools_2023-11-13_12_41_23.152.json
flutter doctor -v (stable and master)
[✓] Flutter (Channel stable, 3.13.9, on macOS 14.1 23B74 darwin-x64, locale en-VN) • Flutter version 3.13.9 on channel stable at /Users/huynq/Documents/GitHub/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision d211f42860 (11 days ago), 2023-10-25 13:42:25 -0700 • Engine revision 0545f8705d • Dart version 3.1.5 • DevTools version 2.25.0 [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) • Android SDK at /Users/huynq/Library/Android/sdk • Platform android-34, build-tools 34.0.0 • ANDROID_HOME = /Users/huynq/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 15.0.1) • Xcode at /Users/huynq/Downloads/Xcode.app/Contents/Developer • Build 15A507 • CocoaPods version 1.13.0 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2022.3) • Android Studio at /Applications/Android Studio Giraffe.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 17.0.6+0-17.0.6b829.9-10027231) [✓] Android Studio (version 2022.2) • 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 • android-studio-dir = /Applications/Android Studio.app/ • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694) [✓] VS Code (version 1.84.0) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.76.0 [✓] Connected device (4 available) • RMX2001 (mobile) • EUYTFEUSQSRGDA6D • android-arm64 • Android 11 (API 30) • iPhone (mobile) • d9a94afe2b649fef56ba0bfeb052f0f2a7dae95e • ios • iOS 15.7.9 19H365 • macOS (desktop) • macos • darwin-x64 • macOS 14.1 23B74 darwin-x64 • Chrome (web) • chrome • web-javascript • Google Chrome 118.0.5993.117 [✓] Network resources • All expected network resources are available. • No issues found!MattyBoy4444 commentedon Feb 12, 2025
Any update?
wangfeihang commentedon Jan 9, 2026
Hi everyone! I've submitted a PR try to optimizes this jank. You can check it out here:
#180563
#10738
[two_dimensional_scrollables] optimizes tableview janks with >250k ro…
github-actions commentedon Feb 5, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.