o-spreadsheet icon indicating copy to clipboard operation
o-spreadsheet copied to clipboard

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

Open hokolomopo opened this issue 9 months ago • 1 comments

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

hokolomopo avatar Mar 20 '25 08:03 hokolomopo

Pull request status dashboard

robodoo avatar Mar 20 '25 08:03 robodoo

@robodoo help

hokolomopo avatar May 05 '25 09:05 hokolomopo

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 avatar May 05 '25 09:05 robodoo

@robodoo up to saas-18.3

hokolomopo avatar May 05 '25 09:05 hokolomopo

Forward-porting to 'saas-18.3'.

robodoo avatar May 05 '25 09:05 robodoo