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

Avoid unnecessary re-renderings in column settings sidebar #42595

Merged
merged 3 commits into from
May 14, 2024

Conversation

uladzimirdev
Copy link
Contributor

@uladzimirdev uladzimirdev commented May 13, 2024

Improves performance of viz settings column picking

Before

Screen.Recording.2024-05-14.at.00.06.28.mov

After

Screen.Recording.2024-05-14.at.00.02.14.mov

Copy link

replay-io bot commented May 13, 2024

Status Complete ↗︎
Commit d3a6991
Results
⚠️ 5 Flaky
2503 Passed

Copy link
Contributor

@ranquild ranquild left a comment

Choose a reason for hiding this comment

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

@uladzimirdev this is "memo" + removing of props spreading to make it work, right?

@uladzimirdev
Copy link
Contributor Author

@uladzimirdev this is "memo" + removing of props spreading to make it work, right?

@ranquild correct, memo allows to avoid re-renderings when parent component is re-rendered, using explicit props allows avoid passing unnecessary "changed" props.

  • useMemo and useCallback inside ChartSettingsSidebar

@metabase-bot metabase-bot bot added the visual Run Percy visual testing label May 13, 2024
Copy link

github-actions bot commented May 13, 2024

Codenotify: Notifying subscribers in CODENOTIFY files for diff 9d968d9...d3a6991.

Notify File(s)
@alxnddr frontend/src/metabase/visualizations/components/ChartSettings.jsx

@uladzimirdev uladzimirdev added no-backport Do not backport this PR to any branch backport Automatically create PR on current release branch on merge and removed no-backport Do not backport this PR to any branch labels May 13, 2024
@uladzimirdev uladzimirdev merged commit 2555eeb into master May 14, 2024
121 of 145 checks passed
@uladzimirdev uladzimirdev deleted the address-perf-issue-picking-columns branch May 14, 2024 08:22
Copy link

@uladzimirdev Did you forget to add a milestone to the issue for this PR? When and where should I add a milestone?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport Automatically create PR on current release branch on merge .Team/QueryingComponents visual Run Percy visual testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants