flutter_confetti icon indicating copy to clipboard operation
flutter_confetti copied to clipboard

Performance is low on Android

Open penguru opened this issue 4 years ago • 3 comments

In many Android phones I tested, animation is quite slow

penguru avatar Sep 08 '21 09:09 penguru

Hey @penguru, at least for the time being it may be slow on older devices. I have some ideas to improve the performance in the future.

funwithflutter avatar Jan 02 '22 09:01 funwithflutter

Would you have any recommendations on how to optimise confetti animations? Something to add to the pages with confettis, or maybe something to avoid / remove?

https://user-images.githubusercontent.com/86661185/193251827-db79de15-b0a0-4527-9a32-191397280336.mov

cekrozl1 avatar Sep 30 '22 10:09 cekrozl1

Hi !

A quick update on the performance issue. It has been identified and likely related to the page transition widget.

The confettis have no performance issues after the page_transition is removed.

cekrozl1 avatar Oct 04 '22 13:10 cekrozl1

Hi @cekrozl1 thanks for sharing. Yes unfortunately if there are other complex operations/animations happening, then it may result in dropped frames.

In the latest release there will be big performance enhancements: https://github.com/funwithflutter/flutter_confetti/pull/76

In this release it will be more performant and it will also try to limit the number of confetti being created if there are missed frames. See the changelog for details.

That said, it's always recommended to test animations on the lowest supported device.

HayesGordon avatar Dec 17 '22 04:12 HayesGordon

Something we could add in the future is an optimized performance mode, and then subsequently disable some of the effects. For example, rotations.

HayesGordon avatar Dec 17 '22 04:12 HayesGordon