summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/lib/summernote/src/js/EventHandler.js
diff options
context:
space:
mode:
authorRaphael Collet <rco@odoo.com>2019-01-02 13:14:08 +0000
committerRaphael Collet <rco@odoo.com>2019-01-03 12:45:48 +0000
commita07a076c45fc4b83caa9ab30ca919b30016015a7 (patch)
tree5eae26d000367bee40bdae7432d2b3d8aa88592d /addons/web_editor/static/lib/summernote/src/js/EventHandler.js
parent9ef7802520d9bdffd85861d31eaa28b5b094c39a (diff)
[FIX] models: avoid prefetch hell when reading fields
The method `read()` may be very slow when reading relational fields and computed fields, because the computed fields can be computed on a recordset that is larger than expected. The issue occurs on model 'res.partner' when reading fields 'child_ids' and 'purchase_order_count', for instance. Suppose we read those two fields on a partner with 1000 contacts. First, the one2many field is read from the database and stored to the cache; the latter adds the value ids to the prefetching of 'res.partner'. Then, the fields are fetched from the cache. When 'purchase_order_count' is accessed on the partner, the field is computed on all its children as well... closes odoo/odoo#29867
Diffstat (limited to 'addons/web_editor/static/lib/summernote/src/js/EventHandler.js')
0 files changed, 0 insertions, 0 deletions