Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cropping images takes an unholy amount of time (30s+) #1418

Closed
teolemon opened this issue Mar 30, 2022 · 6 comments · Fixed by #1422
Closed

Cropping images takes an unholy amount of time (30s+) #1418

teolemon opened this issue Mar 30, 2022 · 6 comments · Fixed by #1422

Comments

@teolemon
Copy link
Member

What

  • Cropping images takes an unholy amount of time (30s+)

Steps to reproduce the behavior

  1. Go to product page
  2. Take more photos from carousel
  3. Take and crop photo
  4. Wait
  5. Wait
  6. Wait again
  7. Start screaming

Expected behavior

  • Not waiting

Why

  • Alex wants free time

Part of

Video

Smartphone model

  • Device: Huawei Y7
  • OS: Android 8.0
  • WiFi
  • App Version 0.0.3 (242)
@M123-dev
Copy link
Member

Thats a long time indeed. I just check it is actually pretty quick on my phone so it's a overall performance thing and no problem in our code. But good news, if we decide to switch back to a native scanner as the idea came up in #1400 the performance should get a little bit better

@teolemon
Copy link
Member Author

The question is:

  • would there be a way to optimize performance by reducing the size of the image ?
  • how much can we reduce that size?

@monsieurtanuki
Copy link
Contributor

For my own app I coded my own cropping tools, with immediate results: please have a go with app "Camino Logo".
That said, the slow part is when you actually create a new JPEG (or PNG, can't remember) from your original picture and cropping parameters. That's maybe part of your problem @teolemon, with a smartphone with high definition: tons of pixels.

@monsieurtanuki
Copy link
Contributor

@teolemon Beyond your frustration of "it takes a looooooong time", I can detect other types of worries:

  • "What's going on? I can't even remember what I clicked. Which step is being processed? Perhaps it crashed and I cannot see it? Is there a percentage?"
  • "I would like to stop that NOW!"

Again, the use of LoadingDialog or something similar would be much better - UX-wise - than just a CircularProgressIndicator.
And we should make a smoothie standard out of it.

@teolemon
Copy link
Member Author

(It was actually reported by @alexgarel, I was merely the expert videographer 🙃 )

@monsieurtanuki
Copy link
Contributor

Rather than asking people to wait, we should remove the underlying cause

Sure. There are also other cases when we do need a "cancel" button, e.g. while downloading with a very slow internet.

put a "Still working" message [...] inline to avoid popup induced claustrophobia

I understand how aggressive a pop-up may appear. You can still put a "cancel" button on your message.

Basically, what we need is a "smooth" snackbar. But still, we should be able to kind of freeze the rest of the screen, unless you're very comfortable with several parallel actions. That's why the modal dialog was a good choice in a first approach. To be fine-tuned...

@teolemon teolemon added this to the V 1 milestone Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

3 participants