summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorMartin Trigaux <mat@odoo.com>2016-06-03 15:24:41 +0200
committerMartin Trigaux <mat@odoo.com>2016-06-28 13:23:41 +0200
commit173b76c7bb343a5bf3437cc53ddcaebfce4fccb1 (patch)
tree12f71d119b6becce16bdf4b85ab518063a770ad9 /addons/web/static/src
parent10550aa5a5ae261c3b1e1b9e4c95b4e5bfbe8ec6 (diff)
[FIX] point_of_sale: performance and invalidation
Function fields, old-api style, that are not stored do not have cache invalidation mechanisms. This means that they are recomputed every time the field is accessed. Due to the way the cache behaves, the records that are present in the cache will be included when the prefetching is done. In the scenario of the a POS session being closed, this implies that the cache will contains more and more account.move.line records and try to prefetch all (hopefully max 1000) without ever relying on the computed result for the next access. This makes the computation of fields `amount_total` and `price_subtotal` very slow, even for orders with a very low number of lines. Backport the new API migration of these computed field to benefit from depends mechanism and keep the computed value into cache when needed. In master these fields should be stored.
Diffstat (limited to 'addons/web/static/src')
0 files changed, 0 insertions, 0 deletions