odoo/o-spreadsheet#7431

Created by fw-bot
Merged at f89aba36336f401622561584c9ca907e03e26765

Statuses:

label
odoo:master-saas-18.4-fix-animation-perf-rar-475831-fw
head
cf6606fd1728c0828b1f4aeb6f176b9e3cabfabd
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