odoo/o-spreadsheet#4129

Created by fw-bot
Merged at 05fd37f3f2fe37771ecf4db3f7ebdbddc443a30a

Statuses:

label
odoo:saas-17.2-saas-16.4-fix-spread-self-invalidation-rar-evaT-fw
head
5fe5b3f5d26ea8517b3e9198be2b758754bc6652
merged
1 year ago by BI, Rémi Rahir (rar)
odoo/o-spreadsheet
saas-16.4 #4106
16.0
17.0 #4126
saas-17.1 #4128
18.0
saas-17.2 #4129
saas-18.1
saas-18.2
saas-18.3
saas-18.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

  • [ ] feature is organized in plugin, or UI components
  • [ ] support of duplicate sheet (deep copy)
  • [ ] in model/core: ranges are Range object, and can be adapted (adaptRanges)
  • [ ] in model/UI: ranges are strings (to show the user)
  • [ ] undo-able commands (uses this.history.update)
  • [ ] multiuser-able commands (has inverse commands and transformations where needed)
  • [ ] new/updated/removed commands are documented
  • [ ] exportable in excel
  • [ ] translations (_t("qmsdf %s", abc))
  • [ ] unit tested
  • [ ] clean commented code
  • [ ] track breaking changes
  • [ ] doc is rebuild (npm run doc)
  • [ ] status is correct in Odoo

Forward-Port-Of: #4128
Forward-Port-Of: #4106