-
Notifications
You must be signed in to change notification settings - Fork 16.2k
fix(perf): dashboard performance issues #36119
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
Conversation
Code Review Agent Run #273280Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've completed my review and didn't find any issues.
Files scanned
| File Path | Reviewed |
|---|---|
| superset-frontend/src/dashboard/components/nativeFilters/FilterCard/useFilterDependencies.ts | ✅ |
| superset-frontend/src/dashboard/components/nativeFilters/ChartCustomization/selectors.ts | ✅ |
| superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Horizontal.tsx | ✅ |
| superset-frontend/src/dashboard/components/nativeFilters/state.ts | ✅ |
| superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Vertical.tsx | ✅ |
| superset-frontend/src/dashboard/components/GroupByBadge/index.tsx | ✅ |
| superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControls.tsx | ✅ |
| superset-frontend/src/dashboard/util/charts/getFormDataWithExtraFilters.ts | ✅ |
| superset-frontend/src/dashboard/components/gridComponents/Chart/Chart.jsx | ✅ |
| superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.tsx | ✅ |
Explore our documentation to understand the languages and file types we support and the files we ignore.
Check out our docs on how you can make Korbit work best for you and your team.
villebro
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a huge perf improvement! Any before/after rendering stats? Beyond that, all the changes make sense, so LGTM. Only nit that came to mind is having all those duplicated EMPTY_ARRAYs. But I suppose that was needed due to the array types.
SUMMARY
Fix a few problems that were causing massive performance decrease on large dashboards/
state.dashboardState.chartStatesinChart.jsxcaused every chart to rerender every time ANY chart in the dashboard changed its state. Selectingstate.dashboardState.chartStates?.[props.id]reduces rerenders by ensuring that the chart rerenders only when its own state changescreateSelectorstatements for those casesBEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION