summaryrefslogtreecommitdiff
path: root/addons/web/static/lib/jquery.mjs.nestedSortable
diff options
context:
space:
mode:
authorRaphael Collet <rco@odoo.com>2019-11-21 15:35:38 +0000
committerRaphael Collet <rco@odoo.com>2019-11-25 09:04:19 +0000
commitd49e6b91a72d2824df1bd723bac982881893186b (patch)
treebecc3057bd24f6ba282618c8a5385c10cc2762a9 /addons/web/static/lib/jquery.mjs.nestedSortable
parent305c06470ebc6497fb3d1dfa9c9eb30383064538 (diff)
[FIX] fields: do not prefetch fields translated with a callable
This is a performance fix. It avoids the cost of XML/HTML translations for fields that may not be necessary when prefetching fields on records. This patch marks such fields as non-prefetchable by default. The code that changes the attribute `translate` on HTML fields (from `translate=True` to `translate=html_translate`) has been adapted to allow the setup of textual fields to mark the field as non-prefetchable. Jairo Llopis made a comparative benchmark: evaluating `name_get` on `event.event` records. The method needs the field `name` and without the patch, the prefetching mechanism reads the translated HTML field `description` as well. This patch speeds up the benchmark from 5800ms to 800ms (see https://github.com/odoo/odoo/pull/37967#issuecomment-538364011). closes odoo/odoo#40771 X-original-commit: e5ee5e5b65f85d66c8d59594ead9eece172c4282 Signed-off-by: Raphael Collet (rco) <rco@openerp.com> Co-authored-by: Pedro Baeza <pedro.baeza@tecnativa.com> Co-authored-by: Jairo Llopis <jairo.llopis@tecnativa.com>
Diffstat (limited to 'addons/web/static/lib/jquery.mjs.nestedSortable')
0 files changed, 0 insertions, 0 deletions