odoo/o-spreadsheet#7402

Created by BI, Rémi Rahir (rar)
Merged at 15da32f9d24aad188704ff53e90e94aee984c7d3

Statuses:

label
odoo:saas-18.4-fix-animation-perf-rar
head
f97afae0b2935a825486f4599a95de1302fc9f8a
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