openfoodfacts / openfoodfacts-androidapp

(Legacy) Native version of Open Food Facts on Android - Coders & Decoders welcome 🤳🥫
https://android.openfoodfacts.org
Apache License 2.0
772 stars 447 forks source link

Do we need to load the ingredient taxonomy for Open Food Facts ? #3974

Closed teolemon closed 3 years ago

teolemon commented 3 years ago

Do we need to load the ingredient taxonomy for Open Food Facts ?

https://github.com/openfoodfacts/openfoodfacts-androidapp/blob/develop/app/src/main/java/openfoodfacts/github/scrachx/openfood/jobs/LoadTaxonomiesWorker.kt#L50

VaiTon commented 3 years ago

If I remember correctly, we use the ingredient taxonomy to analyze ingredients. Am I wrong?

VaiTon commented 3 years ago

Also, this is done in a Background Worker so it should not cause any ANR

teolemon commented 3 years ago

I believe it's not used in Open Food Facts, only in Open Beauty Facts (for the ingredient tab). We also merged some foundation work by dobriseb, but it's not actively called in either of the apps. Also, I do have an ANR when first opening the app (during the onboarding slides), which is the time the download happens.

VaiTon commented 3 years ago

Also, I do have an ANR when first opening the app (during the onboarding slides), which is the time the download happens.

But this is not related to downloads. They should be downloaded in background and we should not wait for them. Does this happen on develop or prod?