Skip to content

Conversation

@kgabryje
Copy link
Member

SUMMARY

Fix a few problems that were causing massive performance decrease on large dashboards/

  1. Redux selectors - selecting a large, frequently changing object. For example, selecting state.dashboardState.chartStates in Chart.jsx caused every chart to rerender every time ANY chart in the dashboard changed its state. Selecting state.dashboardState.chartStates?.[props.id] reduces rerenders by ensuring that the chart rerenders only when its own state changes
  2. Redux selectors - returning a non-memoized complex objects. Returning a complex object from selector (like for example a result of filtering an array from state) caused the component to rerender on each cycle. I introduced createSelector statements for those cases
  3. Passing un-memoized objects as props

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

  1. Create a large dashboard (like 50 charts for example)
  2. In Chrome dev tools, performance tab, enable CPU throttling (4x or 6x should be enough).
  3. Verify that your dashboard is usable

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@bito-code-review
Copy link
Contributor

bito-code-review bot commented Nov 14, 2025

Code Review Agent Run #273280

Actionable Suggestions - 0
Review Details
  • Files reviewed - 10 · Commit Range: 188c04e..188c04e
    • superset-frontend/src/dashboard/components/GroupByBadge/index.tsx
    • superset-frontend/src/dashboard/components/gridComponents/Chart/Chart.jsx
    • superset-frontend/src/dashboard/components/nativeFilters/ChartCustomization/selectors.ts
    • superset-frontend/src/dashboard/components/nativeFilters/FilterBar/FilterControls/FilterControls.tsx
    • superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Horizontal.tsx
    • superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Vertical.tsx
    • superset-frontend/src/dashboard/components/nativeFilters/FilterCard/useFilterDependencies.ts
    • superset-frontend/src/dashboard/components/nativeFilters/FiltersConfigModal/FiltersConfigModal.tsx
    • superset-frontend/src/dashboard/components/nativeFilters/state.ts
    • superset-frontend/src/dashboard/util/charts/getFormDataWithExtraFilters.ts
  • Files skipped - 0
  • Tools
    • Eslint (Linter) - ✔︎ Successful
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ Successful

Bito Usage Guide

Commands

Type the following command in the pull request comment and save the comment.

  • /review - Manually triggers a full AI review.

  • /pause - Pauses automatic reviews on this pull request.

  • /resume - Resumes automatic reviews.

  • /resolve - Marks all Bito-posted review comments as resolved.

  • /abort - Cancels all in-progress reviews.

Refer to the documentation for additional commands.

Configuration

This repository uses Default Agent You can customize the agent settings here or contact your Bito workspace admin at [email protected].

Documentation & Help

AI Code Review powered by Bito Logo

@dosubot dosubot bot added change:frontend Requires changing the frontend dashboard:performance Related to Dashboard performance labels Nov 14, 2025
Copy link

@korbit-ai korbit-ai bot left a 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.

Loving Korbit!? Share us on LinkedIn Reddit and X

Copy link
Member

@villebro villebro left a 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.

@sadpandajoe sadpandajoe merged commit 6723a58 into apache:master Nov 17, 2025
64 checks passed
@sadpandajoe sadpandajoe changed the title perf: Fix dashboard performance issues fix(perf): dashboard performance issues Nov 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

change:frontend Requires changing the frontend dashboard:performance Related to Dashboard performance size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants