summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_controller.js
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2018-02-23 14:36:40 +0100
committerThibault Delavallée <tde@odoo.com>2018-02-26 16:58:35 +0100
commitf727e9d9b6a2029b8625ecff229ccd742598322b (patch)
treec90f1d1a73ab659f7482e985adf5b6ee343cb74f /addons/web/static/src/js/views/basic/basic_controller.js
parent2966d4faedb2817039ed608dff48acfda418109e (diff)
[REF] rating: avoid storing rating_value on mail.message
Currently the rating value coming from the rating application is stored on the message it belongs to. However storing it is not necessary as there is no direct search using it. Having a computed field is sufficient for all use cases we currently have in Odoo. Removing the store allow to gain queries. Indeed the field is not computed anymore after each message creation meaning we save queries by not having to check existing ratings. It allows to gain a lot of computation as mail.message is a critical model. On the whole community runbot when installing all modules this leads to a gain of more than 14K queries on 585K which means 2.4% of performances increase. Considering the code size of this optimization this is quite an interesting result. Looking at test_mail performance tests we gain several queries (2/3) for each new message which is coherent with the model change. Finally it allows to lessen the performance difference between tests done with test mail only and tests done with other modules already installed. This is especially simple mail thread-enable records. Related to task ID 51523. #Closes #23294. Done with blessing of @jem-odoo .
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions