Files
odoo_source/addons
Julien (jula) b200b708ea [FIX] calendar: optimize _compute_meeting
__Current behavior before commit:__
`_compute_meeting` computes the meetings linked to the children of the
partners in `self`. To do so, it first retrieves all children partners
of `self`, then it loops through all of them to apply the meetings to
the parents.

This way of doing is inefficient because it is useless to iterate over
the children that don't have any meetings.

__Description of the fix:__
Loop only through the partners that have a meetings instead of all
children partners.

Improve `test_meeting_count` to test the case where only the child
partner has a meeting but the parent has initially none. This test
improvement is a forward port of [#144575][1].

__Benchmark:__

| len(all_partners) | w/o fix | with fix |
| ----------------- | ------- | -------- |
| 1k                | 32 ms   | 14 ms    |
| 100k              | 1500 ms | 800 ms   |

opw-3511371

[1]: https://github.com/odoo/odoo/pull/144575

closes odoo/odoo#146381

X-original-commit: e35949cdd09b4312a60383b79290008e78768b64
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Julien Launois (jula) <jula@odoo.com>
2023-12-15 10:09:36 +00:00
..
2023-10-27 08:36:16 +00:00
2023-12-13 17:11:53 +00:00
2023-10-27 08:36:16 +00:00
2023-10-27 08:36:16 +00:00
2023-10-27 08:36:16 +00:00
2023-12-13 08:24:10 +00:00
2023-11-08 13:34:06 +00:00
2023-11-13 07:26:00 +00:00
2023-10-27 08:36:16 +00:00
2023-10-27 08:36:16 +00:00
2023-10-27 08:36:16 +00:00
2023-10-27 08:36:16 +00:00
2023-10-27 08:36:16 +00:00
2023-11-27 21:39:18 +00:00
2023-10-27 08:36:16 +00:00
2023-10-27 08:36:16 +00:00
2023-10-27 08:36:16 +00:00
2023-10-27 08:36:16 +00:00
2023-10-27 08:36:16 +00:00
2023-11-02 21:02:44 +00:00
2023-12-14 13:04:12 +00:00
2023-10-27 08:36:16 +00:00
2023-10-27 08:36:16 +00:00