odoo/enterprise#85401
Created by fw-bot
Merged
at 9202d8f6458778dbab2c21283754ad59bde2e213
Statuses:
- legal/cla: Contributor License Agreement check
- ci/runbot: Odoo Test Suite
- ci/upgrade_enterprise: Test upgrades for enterprise master
- ci/template: Contact runbot team on discord for help.
- ci/style: Optional style check. Ignore it only if strictly necessary.
- ci/security: Required security check. Can only be ignored by security team.
- ci/l10n: (runtime 2s)
Linked pull requests
- label
- odoo-dev:saas-18.3-saas-18.2-appointment-pivi-431135-fw
- head
- 8b6cc6ae83a4dd68ac803cc93f321fcf69163e9e
- merged
- 1 year ago by Framework (ORM), Piryns Victor (pivi)
| odoo/odoo | odoo/enterprise | |
|---|---|---|
| saas-18.2 | #207015 | #83916 |
| saas-18.3 | #209713 | #85401 |
| saas-18.4 | ||
| 19.0 | ||
| saas-19.1 | ||
| saas-19.2 | ||
| saas-19.3 | ||
| master | #209898 | #85477 |
[FW][PERF] appointment: Speed up loading of the default kanban view
Description
For non-admin users, loading the default kanban view of the Appointment application triggers the compute method
_compute_appointment_counts. This is quite slow as it calls an override of _read_group, which adds an elaborate domain for privacy in _get_default_privacy_domain.
This patch optimizes domains to generate more efficient queries by:
- Simplifying useless sub-queries of the form
fkey in (select id from comodel where id = X)tofkey in (X)where it makes sense (insudocontext) - Adding supporting indexes
Benchmark
On odoo.com, the time for a regular user to open the default kanban view of appointments is:
| Before (hot) | After (hot) | Speedup |
|---|---|---|
| 11s | 1.2s | 9.2x |
Reference
task-4744275
Community PR: odoo/odoo#207015
Forward-Port-Of: #83916