odoo/o-spreadsheet#4128

Created by fw-bot
Merged at 47bb1a92a5441cf0d2c63c335a6d4d75596efd6a

Statuses:

label
odoo:saas-17.1-saas-16.4-fix-spread-self-invalidation-rar-gQ1S-fw
head
33435364a07a40a3f2751d8983bb8c388533f816
merged
2 years ago by BI, Lucas Lefèvre (lul)
odoo/o-spreadsheet
saas-16.4 #4106
16.0
17.0 #4126
saas-17.1 #4128
18.0
saas-17.2 #4129
saas-18.3
saas-18.4
19.0
saas-19.1
saas-19.2
saas-19.3
saas-19.4
master #4131

[FW][FIX] Evaluator: Prevent incorrect invalidations

Description:

This commit solves an issue with the invalidation process of spreaded
formulas. While marking the positions invalidated by a given position,
we would mistakenly mark the latter to be recomputed as well,
effectively creating an infinite loop (position is invalid > invalidate
its dependencies > position is invalidated > etc ...).

This issue was introduced by a bugfix in #3125
and was not discovered as the infinite loop is actually stopped by our
maximum iteration limit.

Avoiding these useless iterations implies a performance improvement of a
factor 30 when reevaluating a spreaded formula.

Co-authored-by: Lucas Lefèvre <lul@odoo.com>

task-3883954

Forward-Port-Of: #4126
Forward-Port-Of: #4106