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

DataTable: Slow filtering global search and 3K records #7608

Closed
vasubansal333 opened this issue Jan 15, 2025 · 11 comments
Closed

DataTable: Slow filtering global search and 3K records #7608

vasubansal333 opened this issue Jan 15, 2025 · 11 comments
Labels
Status: Needs Reproducer Issue needs a runnable reproducer

Comments

@vasubansal333
Copy link

Describe the bug

i have around 3k rows in Datatable used virtual scroller . now using global search over it .The typing is very slow in that . The example shown by you is without search box.

Reproducer

No response

System Information

global search

Steps to reproduce the behavior

apply global search over datatable with 1000 rows and virtual scroller. when type the typing is very slow.

Expected behavior

typing should be fast as pagination

@vasubansal333 vasubansal333 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jan 15, 2025
@melloware melloware added Status: Needs Reproducer Issue needs a runnable reproducer and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Jan 15, 2025
Copy link

Please fork the Stackblitz project and create a case demonstrating your bug report. This issue will be closed if no activities in 20 days.

@melloware
Copy link
Member

Make sure you use filterDelay or 'useDebounce` so it only starts filtering after they have finished typing.

filterDelay : https://primereact.org/datatable/#api.DataTable.props.filterDelay

useDebounce https://primereact.org/hooks/usedebounce/

@melloware melloware changed the title Replace_With_Component_Name: Brief_Bug_Description DataTable: Slow filtering global search and 3K records Jan 15, 2025
@vasubansal333
Copy link
Author

will it be useable in virtualscroller. because global search better in pagination but not in virtualscroller. You can try in https://primereact.org/datatable/#virtualscroll

@melloware
Copy link
Member

@vasubansal333 I don't know you tell me i need a StackBlitz reproducer.

@vasubansal333
Copy link
Author

@melloware
Copy link
Member

Your StackBlitz does not run for me it is throwing errors?

@vasubansal333
Copy link
Author

in this apply global filter and try. https://stackblitz.com/run?file=src%2FApp.tsx

@vasubansal333
Copy link
Author

column filter typing is also slow for virtual scroller

@melloware
Copy link
Member

That link you pasted doesn't work it just is a default link. Can you please provide a working StackBlitz?

@sja-cslab
Copy link
Contributor

sja-cslab commented Jan 17, 2025

@melloware the first stack almost works. You have to move the useState call inside the app.tsx into the component.
However the generation is not memoized so filter dont work because the 10,000 entries are re-generated on every render

@melloware
Copy link
Member

Exactly. But my time is limited so the burden of working reproducer is on the OP not me spending time trying to figure out what is wrong with their reproducer. Only so many hours in the day....

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Reproducer Issue needs a runnable reproducer
Projects
None yet
Development

No branches or pull requests

3 participants