odoo/o-spreadsheet#7429

Created by fw-bot
Merged at bd19f6c53d44ca7ebe9a86388ef9f1c04c6492a6

Statuses:

label
odoo:19.0-saas-18.4-fix-animation-perf-rar-474949-fw
head
a266b4a22adfde9c2110f4935a90d2f6cd6d00fd
merged
2 months ago by BI, Lucas Lefèvre (lul)
odoo/o-spreadsheet
saas-18.4 #7402
19.0 #7429
saas-19.1
master #7431

[PERF] Renderer: speed-up box generation

when invalidating a lot of cells at once (typically happens during a MOVE_COLUMN_ROW command with a lot of headers), we compute the zones in which we can prevent animations during the next rendering. Each updated cell will need to be compared to the boxes that we want to rerender. The more the updated cells, the more comparisons will take place.

This revision adds a performance step to recompute the animation-invalidated zones in order to limit the overall comparisons.

Performance benchmark steps:
- Create a sheet with 5000 rows
- In the first column, each cell has a reference to its neighbour (=B1,=B2, etc)
- Move the first column to column C

before - 1300 ms
after - 540 ms

task-5213090

Description:

description of this task, what is implemented and why it is implemented that way.

Task: TASK_ID

review checklist

  • [ ] 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: #7402