Skip to content

I'm getting 4-5 seconds freezes when trying to take a photo (high-end device) #7700

Description

@teolemon
  • I'm getting systematic 4-5 seconds freezes on the viewfinder when trying to take a photo
  • I'm using a high-end device (Pixel 10 with loads of RAM)
  • It's systematic, possibly starting after the recent upgrades.
  • It's REALLY annoying, each photo does this.

Activity

  1. monsieurtanuki commented on Aug 27, 2026

    @monsieurtanuki
    Contributor

    @teolemon I've just tried with the latest dev code on my sh*tty android. It was as fast as I expected:

    1. went to the ingredient picture page
    2. tapped on "take a new picture"
    3. selected "camera"
    4. took a picture
    5. tapped on "ok" (android camera confirming that the picture was good enough to me)
    6. landed on the crop page
    7. I didn't go further as I was in PROD - I can test again in DEV if needed

    Which step was long? I guess it was between 5 and 6, right?

  2. teolemon commented on Aug 27, 2026

    @teolemon
    MemberAuthor

    Between 3 and 4.

  3. monsieurtanuki commented on Aug 27, 2026

    @monsieurtanuki
    Contributor

    The recent change would be in image_crop_page.dart.
    Instead of

        return picker.pickImage(source: ImageSource.camera);

    the following code:

        return picker.pickImage(
          imageQuality: ImagePickerConstants.imageQuality, // 80%, instead of 100%
          maxHeight: ImagePickerConstants.maxSize.toDouble(), // 3000, instead on unlimited
          maxWidth: ImagePickerConstants.maxSize.toDouble(), // 3000, instead on unlimited
          source: ImageSource.camera,
        );

    Same for gallery.

    We also recently upgraded image_picker from 1.2.2 to 1.2.3, but the changelog shows no related explanation.

    @teolemon Would you try again, removing one by one imageQuality, maxHeight and maxWidth, to check which ones have an impact on your UX?

  4. monsieurtanuki commented on Aug 27, 2026

    @monsieurtanuki
    Contributor

    @teolemon Please try https://www.fabricefontaine.fr/food/app-release.apk (https://www.fabricefontaine.fr/food/app-release.apk.sha1)
    It's a simple app with image picker, with different parameters.
    What we currently use in Smoothie is "80,3000,true".
    Do you have to wait 5 seconds after you tap on the button?

  5. monsieurtanuki commented on Aug 28, 2026

    @monsieurtanuki
    Contributor

    @teolemon Had a chance to test my little app? Just to make sure it's a matter of flutter upgrade - or not.

  6. monsieurtanuki commented on Sep 19, 2026

    @monsieurtanuki
    Contributor

    @teolemon Still having the same issue even with the latest code?

  7. teolemon commented on Sep 19, 2026

    @teolemon
    MemberAuthor

    The app crashes at startup currently

  8. monsieurtanuki commented on Sep 19, 2026

    @monsieurtanuki
    Contributor

    @teolemon Latest code, in DEBUG mode - it works!
    Image

  9. teolemon commented on Sep 19, 2026

    @teolemon
    MemberAuthor

    I relaunched an internal

  10. monsieurtanuki commented on Oct 7, 2026

    @monsieurtanuki
    Contributor

    @teolemon Still happening after #7807?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions