Files
odoo_source/addons/mrp_subcontracting/models
Aurelien MARIE (auma) 42a72f6a20 [PERF] mrp_subcontracting: Speed up confirmation of PO
Current behavior:
Confirming a Purchase Order with more than 50 lines takes
too much time to be processed. In the case of the client
they had PO with more than 200 lines which makes it
impossible for them to confirm them.

Step to reproduce:
- Install mrp and mrp_subcontracting
- Create PO with more than 50 order lines or more
- Try to confirm it
- Take a long time or timeout

Benchmark (made in 16):
| No. of PO lines | Before  | After  |
|-----------------|:-------:|:------:|
| 9               |  1s30   |  1s30  |
| 91              |  1min   |   16s  |
| 273             |  4min   |   50s  |
| 405             | 4min30s | 1min6s |

Fix:
Batch more actions and records to reduce the number of
queries generated by the ORM.

opw-3625892

closes odoo/odoo#149830

X-original-commit: 7d9d7917948df966ada2055dcfead0cabaaf0651
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
2024-02-01 07:06:47 +00:00
..