diff options
| author | Ivan Yelizariev <iel@odoo.com> | 2021-03-23 10:11:29 +0000 |
|---|---|---|
| committer | Ivan Yelizariev <iel@odoo.com> | 2021-04-08 08:51:38 +0000 |
| commit | 55d3ef07e88143c37c06f59e3a9d85e4653a293f (patch) | |
| tree | 93d52345c85a2409d5a0f78d7144454409fd45db /doc/_static/extract_api_implementation.py | |
| parent | 9ef9406064605d80787ae70c61bd028dda31c0be (diff) | |
[FIX] mrp: optimize quantities computation
Previous implementation makes O(n) sql queries, which leads to performance
issues in products with many variants
Performance test
================
Test for product template with 400 variants
```
product_template.read(['qty_available'])
| | Number of queries | Query time, sec | Remaining time, sec |
|--------+-------------------+-----------------+---------------------|
| Before | 413 | 0.306 | 0.357 |
| After | 14 | 0.029 | 0.086 |
```
---
opw-2480303
closes odoo/odoo#68930
X-original-commit: 5e00b8b77eef7518f93291d85d30b0a1f21f74e1
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
Signed-off-by: Ivan Yelizariev // IEL <yelizariev@users.noreply.github.com>
Diffstat (limited to 'doc/_static/extract_api_implementation.py')
0 files changed, 0 insertions, 0 deletions
