Dimibe / grouped_list

A Flutter ListView in which items can be grouped into sections.
https://pub.dev/packages/grouped_list
MIT License
391 stars 107 forks source link

[Performance] Too many repaints while scrolling #158

Open aytunch opened 2 years ago

aytunch commented 2 years ago

When using a normal ListView.builder or any kind of scrollable, the whole app does not rebuild. But when using GroupedListView and when we are scrolling the whole page rebuilds causing unnecessary CPU and battery load.

You can see this by enabling;

Future<void> main() async {
  debugRepaintRainbowEnabled = true;
  debugRepaintTextRainbowEnabled = true;

When colors change, rebuild happens for those widgets.

https://user-images.githubusercontent.com/6442915/178351106-3573baf6-b57b-4b28-ac19-7de603d3bf41.mov

Shamsudeen12 commented 1 year ago

I have another issue where it takes a while for the screen to open up Do you think it's related?