diff options
| author | Sébastien Theys <seb@odoo.com> | 2019-04-05 09:48:07 +0000 |
|---|---|---|
| committer | Sébastien Theys <seb@odoo.com> | 2019-04-05 09:48:07 +0000 |
| commit | 742fa44fe9a531fa29779089d46f0927521091a9 (patch) | |
| tree | 64a95e1be39034fae0326a658fc3bcca47f58f14 /addons/web/static/src/js/views/basic/basic_renderer.js | |
| parent | 924beddeb13c9e052c9c97146ab458fc2911bdd7 (diff) | |
[FIX] product: fix speed of closest combination
Before this commit, the code would try to loop over all possible combinations
following their sequences, until it found the requested one, which could be
extremely slow if there was a lot of combinations.
Now if the given combination is possible, we skip that useless looping and
yield it directly.
To reproduce this: create a product template with millions of possible
combinations (using dynamic attributes) and try to add to cart a combination
that would be found late in the looping. Before the commit, the request would
take too much time.
opw-1958623
closes odoo/odoo#32433
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_renderer.js')
0 files changed, 0 insertions, 0 deletions
