odoo/o-spreadsheet#4126

Created by fw-bot
Merged at 3046eb22dff8fdb1218b7179d626a39c7d807e40

Statuses:

label
odoo:17.0-saas-16.4-fix-spread-self-invalidation-rar-sK5v-fw
head
09aaed190a0952905a4634b6fea9f38cfd0ee94f
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: #4106