odoo/o-spreadsheet#6571

Created by fw-bot
Merged at c8f8a768c0f5bbb4ff759ea412f2ecd6f8ff764d

Statuses:

label
odoo:saas-18.1-16.0-data-filter-huge-dataset-performance-adrm-441949-fw
head
379e3f81dbc27dff1e1965679b981ab0eda2b69c
merged
7 months ago by BI, Adrien Minne (adrm)
odoo/o-spreadsheet
16.0 #5977
17.0 #6560
18.0 #6565
saas-18.1 #6571
saas-18.2 #6573
saas-18.3 #6574

[FW][FIX] filter: fix horrible performances with huge data filters

Description

On a spreadsheet with 10,000 rows, opening the filter menu and filtering all the values is really slow. This commit improves the performance a bit.

On a data filter with 10,000 rows:
- getFilterValues (when opening filter menu): ~1000ms => ~70ms
- updateHiddenRows (when filtering all values): ~543ms => ~8ms

Note that the filter menu still takes a while to open and is laggy. It's because we create a HTML list with 10,000 elements, which is very slow. Fixing this would require big changes in the filter menu component, so it won't be done in stable.

Task: 4658998

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: #6565
Forward-Port-Of: #5977