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

Improve datatable performance #4008

Merged

Conversation

andrewguy
Copy link
Contributor

@andrewguy andrewguy commented May 31, 2023

Helps fix #4007

This PR does 2 main things to help improve filtering and sorting performance for DataTables:

  • Within the sortSingle function, performing calls to resolveFieldData(data1, this.d_sortField) only once for each item in the dataset, and using a Map for later lookups.
  • Within the filter function, only run filters whose value is not null.

@vercel
Copy link

vercel bot commented May 31, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
primevue ⬜️ Ignored (Inspect) Visit Preview Aug 17, 2023 1:06pm

@NeluQi
Copy link

NeluQi commented Jun 10, 2023

+1

pls merge

@melloware
Copy link
Member

Thank you for these hints I applied the same fixes to PrimeReact: primefaces/primereact#4769

Copy link
Member

@tugcekucukoglu tugcekucukoglu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lookupMap is not a function.

Could you replace it with lookupMap.get()

@tugcekucukoglu tugcekucukoglu added the Resolution: Needs Revision The pull request can't be merged. Conflicts need to be corrected or documentation and code updated. label Aug 17, 2023
@tugcekucukoglu tugcekucukoglu merged commit 956bf9f into primefaces:master Aug 18, 2023
2 of 3 checks passed
@tugcekucukoglu tugcekucukoglu removed the Resolution: Needs Revision The pull request can't be merged. Conflicts need to be corrected or documentation and code updated. label Aug 18, 2023
tugcekucukoglu added a commit that referenced this pull request Aug 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DataTable: Slow filter and sort performance with large datasets
4 participants