flutter_staggered_grid_view icon indicating copy to clipboard operation
flutter_staggered_grid_view copied to clipboard

Memory does not decrease with a large list.

Open vantrung8794 opened this issue 3 years ago • 12 comments

Memory does not decrease with a large list. I tried SliverStaggeredGrid.builder and SliverStaggeredGrid.countBuilder with a large number of tiles. When I scroll, the old item in the grid which disappeared still alive and took lots of my memory. The problem is when my list has many items. App will crash because the memory is not enough. => I tried to change to Gridview.builder. The problem is solved. Gridview.builder release old item which disappeared and rebuild when items are showed on screen.

vantrung8794 avatar May 29 '21 04:05 vantrung8794

any one has a solution for this situation?

vantrung8794 avatar Jun 01 '21 09:06 vantrung8794

The reason for this is that all children of the grid are cached indefinitely.

Currently there is no way of disabling this behaviour. However, I have opened PR #188 that allows this.

clragon avatar Jul 04 '21 22:07 clragon

me too. and study on it.

bladeofgod avatar Jul 09 '21 04:07 bladeofgod

go with waterfall_flow: ^3.0.1 it working good

ap1781994 avatar Aug 12 '21 05:08 ap1781994

I experienced the same problem, which is a deal breaker for me, as I have 1000+ items in the grid. Especially when rotating the phone, it's horrendous to redraw, and I can see it going through all items up to the scroll point. I initially thought there was something wrong with my implementation, but now I see a lot of people with the same problem. I am currently using GridView.builder, which is fast, no problems, except that I'm stuck with same size tiles.

babaosoftware avatar Aug 22 '21 14:08 babaosoftware

Can you test with the latest 0.5.0 preview? https://pub.dev/packages/flutter_staggered_grid_view/versions/0.5.0-dev.1

letsar avatar Dec 12 '21 18:12 letsar

Use https://pub.dev/packages/waterfall_flow it working good no issues of size and large data

On Mon, Dec 13, 2021, 12:04 AM Romain Rastel @.***> wrote:

Can you test with the latest 0.5.0 preview? https://pub.dev/packages/flutter_staggered_grid_view/versions/0.5.0-dev.1

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/letsar/flutter_staggered_grid_view/issues/180#issuecomment-991948266, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOJSVTUNTLAG7ME544PLWZTUQTTKRANCNFSM45X4I3CQ .

ap1781994 avatar Dec 12 '21 19:12 ap1781994

This comment does not help. The package has been rewritten and the performance issues has been resolved for what I can tell. @vantrung8794 I suggest you to try the latest version available: https://pub.dev/packages/flutter_staggered_grid_view/versions/0.5.0-dev.1

letsar avatar Dec 13 '21 20:12 letsar

Ok, I'll check it out.

On Tue, Dec 14, 2021, 1:50 AM Romain Rastel @.***> wrote:

This comment does not help. The package has been rewritten and the performance issues has been resolved for what I can tell. @vantrung8794 https://github.com/vantrung8794 I suggest you to try the latest version available: https://pub.dev/packages/flutter_staggered_grid_view/versions/0.5.0-dev.1

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/letsar/flutter_staggered_grid_view/issues/180#issuecomment-992856129, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOJSVTSGXBQ7LQZH2OFYSJDUQZIRVANCNFSM45X4I3CQ .

ap1781994 avatar Dec 14 '21 05:12 ap1781994

confirmed

This comment does not help. The package has been rewritten and the performance issues has been resolved for what I can tell. @vantrung8794 I suggest you to try the latest version available: https://pub.dev/packages/flutter_staggered_grid_view/versions/0.5.0-dev.1

LoremIpsum1512 avatar Dec 28 '21 15:12 LoremIpsum1512

Still have this problem nowadays with v0.6.1, I ll try waterfall_flow.

yaozy003 avatar Jun 21 '22 06:06 yaozy003

Have you some code I could just copy/paste and run to see where the issue comes from?

letsar avatar Jul 10 '22 08:07 letsar

Closing since no response since a while.

letsar avatar Nov 01 '22 10:11 letsar