Files
odoo_source/addons/mail/models
Géry Debongnie 7922370f12 [FIX] mail: fix performance issue with large channels
When a user is subscribed to a channel with many messages,
the discuss initial rpc /mail/client_action can become very
slow (in production, the rpc took > 20s when subscribed to
the Community mailing list).  This is due to the query in
_get_message_unread, counting the number of unread messages.

This commit adds an index on the relation mail_channel_partner,
this allows postgres to perform only index lookups, and speeds
up the query by 2 order of magnitudes.
2016-04-27 17:00:20 +02:00
..