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

We should not query all languages at the same time #3857

Closed
teolemon opened this issue Feb 23, 2021 · 1 comment
Closed

We should not query all languages at the same time #3857

teolemon opened this issue Feb 23, 2021 · 1 comment
Labels
lite API Ideas and proposals for the use of the lite API network

Comments

@teolemon
Copy link
Member

teolemon commented Feb 23, 2021

As pointed out by @stephanegigandet we query both attribute_groups_en + attribute_groups_fr, which is draining ressources on the servers (and also makes the product longer to load). We should only query the current language of the UI

"GET /api/v0/product/7622210444097.json?fields=product_name%2Cgeneric_name%2Cimage_small_url%2Cimage_front_url%2Cimage_ingredients_url%2Cimage_nutrition_url%2Cimage_packaging_url%2Cimage_url%2Cselected_images%2Clanguages_codes%2Cvitamins_tags%2Cminerals_tags%2Camino_acids_tags%2Cother_nutritional_substances_tags%2Curl%2Ccode%2Ctraces_tags%2Cingredients_that_may_be_from_palm_oil_tags%2Cadditives_tags%2Callergens_hierarchy%2Cmanufacturing_places%2Cnutriments%2Cingredients_from_palm_oil_tags%2Cbrands_tags%2Ctraces%2Ccategories_tags%2Cingredients_text%2Cingredients_from_or_that_may_be_from_palm_oil_n%2Cserving_size%2Callergens_tags%2Callergens%2Corigins%2Cstores%2Cnutrition_grade_fr%2Cnutrition_grades_tags%2Cnutrient_levels%2Cecoscore_grade%2Ccountries%2Ccountries_tags%2Cbrands%2Cpackaging%2Clabels_tags%2Clabels_hierarchy%2Ccities_tags%2Cquantity%2Cingredients_from_palm_oil_n%2Clink%2Cemb_codes_tags%2Cstates_tags%2Ccreator%2Ccreated_t%2Clast_modified_t%2Clast_modified_by%2Ceditors_tags%2Cnova_groups%2Clang%2Cpurchase_places%2Cnutrition_data_per%2Cno_nutrition_data%2Cother%2Cother_information%2Cconservation_conditions%2Crecycling_instructions_to_discard%2Crecycling_instructions_to_recycle%2Cwarning%2Ccustomer_service%2Cenvironment_infocard%2Cenvironment_impact_level_tags%2Cingredients_analysis_tags%2Cingredients%2Cproduct_name_fr%2Cproduct_name_en%2Cgeneric_name_fr%2Cgeneric_name_en%2Cingredients_text_fr%2Cingredients_text_en%2Cother_information_fr%2Cother_information_en%2Cconservation_conditions_fr%2Cconservation_conditions_en%2Crecycling_instructions_to_discard_fr%2Crecycling_instructions_to_discard_en%2Crecycling_instructions_to_recycle_fr%2Crecycling_instructions_to_recycle_en%2Cwarning_fr%2Cwarning_en%2Cattribute_groups_fr%2Cattribute_groups_en%2Ccustomer_service_fr%2Ccustomer_service_en%2Cimage_front_url_fr%2Cimage_front_url_en%2Cimage_ingredients_url_fr%2Cimage_ingredients_url_en%2Cimage_nutrition_url_fr%2Cimage_nutrition_url_en%2Cimage_packaging_url_fr%2Cimage_packaging_url_en HTTP/2.0" 200 7616 "-" "Open Food Facts Official Android App 3.6.6 Scan"
@teolemon teolemon added lite API Ideas and proposals for the use of the lite API network labels Feb 23, 2021
@VaiTon
Copy link
Member

VaiTon commented Feb 27, 2021

To query the actual language and the en language was the expected behavior, so that we have at least a language to display.
I see that when requesting attributes this is kind of useless but for the other fields it becomes necessary.

@VaiTon VaiTon closed this as completed in 6b7cb63 Feb 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lite API Ideas and proposals for the use of the lite API network
Projects
None yet
Development

No branches or pull requests

2 participants