summaryrefslogtreecommitdiff
path: root/doc/reference
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2018-04-03 18:07:21 +0200
committerThibault Delavallée <tde@odoo.com>2018-04-03 18:07:21 +0200
commitf9c210923d89aeabfc358fdc7b8bd76df8c23ce8 (patch)
treee714d590bd6cbe24916babe51869cb9ab00e6b7d /doc/reference
parent3d6f9b5e0ba12ab23bf2aa5e8da7f3fecb7291ea (diff)
parent2dbcbdd3f23f9d2f725e0dc410fc1e30956a9ce1 (diff)
[MERGE][REF] mail, various: optimize implementation of follower subscription
This merge replaces followers subscription code in order to be optimized and perform less queries. This improvement is done in several steps : * mail followers model has new low-level and optimized methods to compute followers to create or update. It uses SQL queries to fetch data in a single request; * mail thread message_subscribe method is rewritten to use this new method. Its API is also simplified and message_subscribe_user is removed to simplify the whole subscription API; * auto subscription is also rewritten. Fetching subtype data about parent / child like project / task is done in a single query that prepares data. It then uses new method to create followers; Various addons are updated because of message_subscribe or auto subscription change. Functionally behavior should stay the same as purpose is to be equivalent in term of functional coverage. Performance counters show this optimized code works well when dealing with large set of followers to subscribe or update. Most tests perform better of a few queries. Most complex ones involving (auto) subscription of several followers perform way better. About 30% of query are saved in the three top tests, aka between 80 and 90 queries with auto subscription of 10 followers. On overall community runbot we have a gain of about 11K queries. As Odoo data has few followers impact on runbot is probably less interesting than impact on real-life use case. Thanks to @rco-odoo for reviewing, and cheers !
Diffstat (limited to 'doc/reference')
0 files changed, 0 insertions, 0 deletions