dangdtr opened a new pull request, #42502:
URL: https://github.com/apache/superset/pull/42502

   ### SUMMARY
   
   Index dashboard chart layout items by chart ID and reuse that index while 
resolving native-filter, chart-customization, and cross-filter scopes.
   
   This removes repeated linear searches through chart layout items for every 
chart/filter pair. It also uses `Set`s for excluded charts, scope roots, and 
selected-layer deduplication while preserving existing ordering and behavior.
   
   A synthetic benchmark with 199 charts and 111 scopes reduced scope 
calculation from approximately 5.48 ms to 1.06 ms (about 5.2x) on the test 
machine.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   Not applicable; this change has no UI differences.
   
   ### TESTING INSTRUCTIONS
   
   1. From `superset-frontend`, run:
      `npm run test -- src/dashboard/util/getChartIdsInFilterScope.test.ts 
src/dashboard/components/nativeFilters/utils.test.ts 
src/dashboard/util/crossFilters.test.ts 
src/dashboard/components/DashboardBuilder/DashboardContainer.test.tsx 
src/dashboard/components/nativeFilters/FilterBar/CrossFilters/ScopingModal/ScopingModal.test.tsx`
   2. Run `pre-commit run --all-files` from the repository root.
   3. Open a dashboard with native filters and cross-filters, then verify 
filter scopes and tab highlighting remain unchanged.
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] 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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to