Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropdown filter freezes screen #6987

Closed
IndyNaessens opened this issue Aug 5, 2024 · 2 comments · Fixed by #6991
Closed

Dropdown filter freezes screen #6987

IndyNaessens opened this issue Aug 5, 2024 · 2 comments · Fixed by #6991
Assignees
Labels
Type: Performance Issue is performance or optimization related
Milestone

Comments

@IndyNaessens
Copy link

IndyNaessens commented Aug 5, 2024

Describe the bug

When having a large list (100k items) with a virtual scroller the filtering is very slow after you select an item near the end of the list:

image

Even with 10k items there is a noticeable delay:

image

When nothing is selected the filter performance is as expected.

Reproducer

https://stackblitz.com/~/github.com/IndyNaessens/primereact-dropdown-slow-filter-demo

System Information

System:
OS: Windows 10 10.0.19045
CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
Memory: 11.29 GB / 31.74 GB
Binaries:
Node: 20.16.0 - C:\Program Files\nodejs\node.EXE
npm: 10.5.2 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Chromium (127.0.2651.74)
Internet Explorer: 11.0.19041.4355
npmPackages:
primereact: ^10.8.0 => 10.8.0
react: ^18 => 18.3.1

Steps to reproduce the behavior

  • npm run build && npm start
  • select last item in dropdown
  • start to type 'item' in filter section
    • result: very slow performance (page freeze)
  • remove selection and start to type 'item' in filter section
    • result: good performance

Expected behavior

Filtering should be as fast when you have nothing selected as when you have an item selected. It should not matter where that item is positioned in the list.

@IndyNaessens IndyNaessens added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Aug 5, 2024
@IndyNaessens IndyNaessens changed the title Dropdown filter freezes screen. Dropdown filter freezes screen Aug 5, 2024
@melloware melloware added Type: Performance Issue is performance or optimization related and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Aug 5, 2024
kl-nevermore added a commit to kl-nevermore/primereact that referenced this issue Aug 6, 2024
@kl-nevermore
Copy link
Contributor

PR Submitted
please note the tips

@IndyNaessens
Copy link
Author

@kl-nevermore thank you for the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Performance Issue is performance or optimization related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants