Skip to content
Snippets Groups Projects
Commit d64fff45 authored by Leloup Loïc (lole)'s avatar Leloup Loïc (lole)
Browse files

[FIX] mail : speed systray_get_activities

When the number of mail.activities for a user was getting too big, the whole database is getting slowed down as the activities are recomputed each time a page is loaded.

The issue was mostly brought by commit [03c3d440](https://github.com/odoo/odoo/commit/03c3d440ae31baa0400b7adba7f6373556ff5c38

).

The time was recorded when refreshing the home page of the site.

|     |     |     |
| --- | --- | --- |
| #activities | before PR | after PR |
| 100 000 on 1 model | 22.66s (single test) | 0.408s (worst of few runs) |
| 40 on 40 models | 0.06s worst, 0.037s best | 0.053s (worst of few) (0.038s best) |

closes odoo/odoo#136137

X-original-commit: bba39fa8
Signed-off-by: default avatarSébastien Theys (seb) <seb@odoo.com>
parent 540dcc71
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment