c8d5ff55ffa552984e71391eff0b51baae5e6c90
This optimizes the confirmation of a sale_order in the ecommerce by ~73%, for a cart with 160 unique items, the processing time goes from 7m46s to 39s, which is roughly the same amount of processing time if the module `sale_coupon` is not installed. This optimization is achieved in two steps: 1. By validating promotional/discounted products in batch instead of validating each product one at a time. 2. By performing an unlink() on invalid reward lines instead of sending a delete command by writing to the one2many, as delete commands are not (yet) performed in batch, which means record recomputation after every delete. opw-1893277 closes odoo/enterprise#2905
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%