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

[core] Run at most one setGridState and one applyFilters when updating the filterModel due to column changes #3023

Merged
merged 4 commits into from
Nov 1, 2021

Conversation

flaviendelangle
Copy link
Member

@flaviendelangle flaviendelangle commented Oct 29, 2021

Before, for N column with a filter removed, we ran (N+1) applyFilters and N setGridState.

For instance, if we changed the columns but did not impact any column with a filterItem, we re-applied the filter anyway.
And if we removed 2 columns that had a filter item, we ran the filters 3 times and did 2 `setGridState).

And the best scenario for the end, if you removed all the columns that had a filter item, it was N+2 applyFilters.
So if you had 2 filter item, you removed both columns, you ended up with 4 application of the filters.

@flaviendelangle flaviendelangle self-assigned this Oct 29, 2021
@flaviendelangle flaviendelangle added performance component: data grid This is the name of the generic UI component, not the React module! core Infrastructure work going on behind the scenes labels Oct 29, 2021
@flaviendelangle flaviendelangle merged commit 7a45e57 into mui:next Nov 1, 2021
@flaviendelangle flaviendelangle deleted the filter-col-update branch November 1, 2021 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: data grid This is the name of the generic UI component, not the React module! core Infrastructure work going on behind the scenes performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants