diff options
| author | Géry Debongnie <ged@odoo.com> | 2018-11-15 12:11:02 +0000 |
|---|---|---|
| committer | Géry Debongnie <ged@odoo.com> | 2018-11-15 15:26:49 +0000 |
| commit | 1bb15e0559aaf15626d5e91e04ebf78cc10cbd44 (patch) | |
| tree | 621c6aabffd8140adfa39b1640ba4cdf153111f5 /setup.py | |
| parent | 92b4e2e866363ecb1b62c2448d40a5fcfc481348 (diff) | |
[FIX] mail: fix performance issue for activity view
Fun fact: for the subscription model in odoo production database, the
get_activity_data rpc takes 36s, and transfer 420mb (non gzipped) of
data (when looking at all subscriptions).
The main reason for that is that the get_activity_data method create a
domain with all the res_ids (so, if you have 20k subscriptions, the
domain will look like (res_id, in, [...20k ids]). This domain is given
to read group, and the resulting groups (each with a domain key which
includes those res_ids) will be sent back to the web client.
As far as I can tell, the domain key is not used by the web client, so
we send (number of groups)*(number of records) of useless data.
This commit improves the situation in two different ways:
- we only generate the domain if there is a domain at the beginning.
This should greatly improve the performance when there is no current
domain
- we do not transfer the data to the web client
Diffstat (limited to 'setup.py')
0 files changed, 0 insertions, 0 deletions
