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

   ### 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
   <!--- Skip this if not applicable -->
   
   ### 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
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] 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