From 195c2fc05f2a2ff4f80bd49066803974519d5a9b Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Thu, 31 May 2018 15:30:40 +0200 Subject: [PATCH] [FIX] website_sale: performance with carousel When the carousel is activated, the following will load all variant ids in the cache (cf. `_in_cache_without`): ``` ``` When accessing the `image` field at: ```
``` All variants in cache will have their image resized by the method `_compute_images` on `product.product`. In case of a product with hundreds of variants with images, this will take a major amount of time. If we replace by `product[:1]`, the system uses another cache, and doesn't fetch the image of all variants. opw-1844783 --- addons/website_sale/views/templates.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/website_sale/views/templates.xml b/addons/website_sale/views/templates.xml index a63ade4e596..2deaaf833b5 100644 --- a/addons/website_sale/views/templates.xml +++ b/addons/website_sale/views/templates.xml @@ -417,7 +417,7 @@