summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/scss/web_editor.variables.scss
diff options
context:
space:
mode:
authorwan <wan@odoo.com>2020-09-23 12:26:18 +0000
committerRaphael Collet <rco@odoo.com>2020-09-28 12:08:23 +0000
commit5bd7ddd0850e56fbbae52b4478970331f9db1589 (patch)
tree0ac2a05f00fe06cf7b5f8ec303234f0cb1a7ede0 /addons/web_editor/static/src/scss/web_editor.variables.scss
parent78abbd6472f4c389ef6b67a257754365f5b02741 (diff)
[FIX] core: prefetching of x2many lines in snapshot.diff()
The prefetching optimization was simply broken for x2many lines in the snapshot method `diff()`. Indeed, iterating on `line._prefetch_ids` actually returns nothing, because this iterable object relies on the value in cache of the x2many field, and the cache has been invalidated before calling `diff()`. In order to re-enable prefetching, we simply populate the cache of x2many fields before looping on the lines. Some testing with `account.move` and the relation `invoice_line_ids`: For 335 invoice lines, changing the value of a field in the invoice lines took about 1.9s with 1415 queries. It now takes about 1.1s and 82 queries. closes odoo/odoo#58622 X-original-commit: 58f1c2bebff4df82cd5963b4141885d8a667396d Signed-off-by: Raphael Collet (rco) <rco@openerp.com> Co-authored-by: Raphael Collet <rco@odoo.com>
Diffstat (limited to 'addons/web_editor/static/src/scss/web_editor.variables.scss')
0 files changed, 0 insertions, 0 deletions