[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 => ~70msupdateHiddenRows(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
@robodoo help
Currently available commands for @hokolomopo:
| command | |
|---|---|
help |
displays this help |
r(eview)+ |
approves the PR, if it's a forwardport also approves all non-detached parents |
r(eview)=<number> |
only approves the specified parents |
fw=no |
does not forward-port this PR |
fw=default |
forward-ports this PR normally |
fw=skipci |
does not wait for a forward-port's statuses to succeed before creating the next one |
fw=skipmerge |
does not wait for the source to be merged before creating forward ports |
up to <branch> |
only ports this PR forward to the specified branch (included) |
merge |
integrate the PR with a simple merge commit, using the PR description as message |
rebase-merge |
rebases the PR on top of the target branch the integrates with a merge commit, using the PR description as message |
rebase-ff |
rebases the PR on top of the target branch, then fast-forwards |
squash |
squashes the PR as a single commit on the target branch, using the PR description as message |
delegate+ |
grants approval rights to the PR author |
delegate=<...> |
grants approval rights on this PR to the specified github users |
default |
stages the PR normally |
priority |
tries to stage this PR first, then adds default PRs if the staging has room |
alone |
stages this PR only with other PRs of the same priority |
cancel=staging |
automatically cancels the current staging when this PR becomes ready |
check |
fetches or refreshes PR metadata, resets mergebot state |
Note: this help text is dynamic and will change with the state of the PR.
@robodoo up to saas-18.3
Forward-porting to 'saas-18.3'.
