openfoodfacts / smooth-app

The new Open Food Facts mobile application for Android and iOS, crafted with Flutter and Dart
https://world.openfoodfacts.org/open-food-facts-mobile-app?utm_source=off&utf_medium=web&utm_campaign=github-repo
Apache License 2.0
742 stars 260 forks source link

fix: Fix performances on the photos gallery #5447

Closed g123k closed 5 days ago

g123k commented 6 days ago

Hi everyone!

I have investigated a bit the UI jank on the photos' gallery:

Potential fixes:

That's why I have removed the color extractor algorithm (there are many complaints on the Flutter GitHub). cacheHeight is used to lower the memory footprint

On my Pixel 8 Pro, in profile mode, scrolling the grid have an average of 115 fps. The memory footprint is a bit reduced. Still not perfect, but faaaaar better.

codecov-commenter commented 6 days ago

Codecov Report

Attention: Patch coverage is 0% with 26 lines in your changes missing coverage. Please review.

Project coverage is 7.18%. Comparing base (4d9c7fc) to head (fdbbb34). Report is 230 commits behind head on develop.

Files Patch % Lines
...p/lib/generic_lib/widgets/images/smooth_image.dart 0.00% 14 Missing :warning:
...ooth_app/lib/pages/image/product_image_widget.dart 0.00% 8 Missing :warning:
.../pages/image/product_image_gallery_other_view.dart 0.00% 4 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #5447 +/- ## ========================================== - Coverage 9.54% 7.18% -2.37% ========================================== Files 325 391 +66 Lines 16411 20377 +3966 ========================================== - Hits 1567 1464 -103 - Misses 14844 18913 +4069 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.