You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Filter and sort performance is slow when dealing with large numbers of filters and/or large datasets with the DataTable component.
This seems to be due to a couple of things:
Large numbers of calls to ObjectUtils.resolveFieldData within the compareFn function passed to sort. ObjectUtils.resolveFieldData is relatively slow. Doing an expensive function call within the compareFn means that sort performance scales poorly with dataset size.
Executing filters even when the filter value is null, which is performed for each item in the data array. If a filter value is null, this filter is still assessed, which also involves a call to ObjectUtils.resolveFieldData. This means that filters on many columns leads to poor performance when filtering or sorting, even if those filters aren't active.
Describe the bug
Confirmed from PrimeVue: primefaces/primevue#4007
Filter and sort performance is slow when dealing with large numbers of filters and/or large datasets with the DataTable component.
This seems to be due to a couple of things:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare
Reproducer
No response
PrimeReact version
9.6.0
React version
18.x
Language
ALL
Build / Runtime
Create React App (CRA)
Browser(s)
ALL
Steps to reproduce the behavior
No response
Expected behavior
Better performance while sorting and filtering.
The text was updated successfully, but these errors were encountered: