summaryrefslogtreecommitdiff
path: root/doc/reference/javascript_reference.rst
diff options
context:
space:
mode:
authorSébastien Theys <seb@odoo.com>2019-07-15 12:42:25 +0000
committerSébastien Theys <seb@odoo.com>2019-07-15 16:28:35 +0000
commit87f20049024ff73b700b2a6eef51b4c8ab9a15b0 (patch)
tree9fd92bd7ad19fe0622f41ee5e6f71d84528dbcac /doc/reference/javascript_reference.rst
parent8514ef827e1fcc2224aa0f4e6c2849819005c27d (diff)
[IMP] product: optimize create_variant_ids by doing batches
Perf for the creation ===================== The biggest impact of this change is when each template has only very few variants to generate and there are a lot of such templates. And when few templates generate a lot of variants this is potentially just a bit better than before, and not definitely not worse. The opposite change was done in commit f8dad1bb4b712d8f34035420ef1f6e484c638f5b due to an issue with unlink but since the unlink is changed to use dichotomy now we have the best of both solutions. For example when creating 10000 products, few with a lot of variants (max 1000) and many with few variants (or only one), the time it takes goes down from at least 10min (the attempt was canceled before the end) to only 25s. Perf for the unlink =================== For the following test case: - create a template - give it 3 attributes, 10 values each - -> that generates 1000 variants - add the first variant to an order to test it - not happy with the config, remove one of the attributes from the template - -> that removes the 1000 variants This is slow because of the `savepoint` used to archive if `unlink` fails. With dichotomy it takes 14s. With a loop (one by one) it takes 5min. Part of task-1918881 closes odoo/odoo#34650 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Diffstat (limited to 'doc/reference/javascript_reference.rst')
0 files changed, 0 insertions, 0 deletions