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

[DataGrid] Improve fastObjectShallowCompare #12022

Closed
wants to merge 1 commit into from

Conversation

romgrk
Copy link
Contributor

@romgrk romgrk commented Feb 10, 2024

The guard removed here is not necessary due to the final aLength === bLength check. This optimization is done under the assumption that the objects are likely to be equal, so short-circuiting there is unlikely to happen.

@romgrk romgrk added performance component: data grid This is the name of the generic UI component, not the React module! labels Feb 10, 2024
@romgrk romgrk requested review from MBilalShafi and cherniavskii and removed request for MBilalShafi and cherniavskii February 10, 2024 22:33
@romgrk
Copy link
Contributor Author

romgrk commented Feb 10, 2024

Actually this one is incorrect: compare({ a: undefined }, { b: undefined }) would be true. Which is probably ok given that we're comparing react props, but I don't have enough confidence in this to push it.

@romgrk romgrk closed this Feb 10, 2024
@romgrk romgrk deleted the perf-compare-faster branch February 10, 2024 22:37
@mui-bot
Copy link

mui-bot commented Feb 10, 2024

Deploy preview: https://deploy-preview-12022--material-ui-x.netlify.app/

Generated by 🚫 dangerJS against 18e9bf4

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! performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants