Search code examples
flutterdartskia

How to fix Jank within GridView and AnimationBuilder?


I have some performance issues after implementing a GridViewBuilder that shows images fetched from firebase:

Usual performance during scroll

Janky performance during scroll

I've observed similar issues when using an AnimationBuilder with more complex animations - SKCanvas Flush seems to be the troublemaker. Anyone got any ideas what might be causing the canvas flushing process to take this long? The Screen holds quite many widgets, but they shouldn't affect the scrolling behavior of the GridViewBuilder


Solution

  • Found the problem,

    the grid was holding some images that were way to big (>1 mb). Reducing image sizes by compressing them fixed the issue for me.