You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
perf(widget-builder): Prevent unnecessary re-render of DashboardDetail when opening the Widget Builder (#102984)
`DashboardDetail` is the whole dashboard, so it's expensive to
re-render. Right now, when the Widget Builder opens it re-renders twice.
One of them is legitimate, because the Widget Builder is now open. One
of them is because `widgetBuilderSelectionState` was re-calculated,
which is not needed.
We only need to recalculate the selection state if the URL selection
changed. If it did not, skip it, and skip the render. This saves like a
300ms render in some cases.
**Before:**
<img width="310" height="190" alt="Screenshot 2025-11-07 at 3 37 09 PM"
src="https://github.com/user-attachments/assets/490819f5-21a5-4621-91c8-c349377486e1"
/>
**After:**
<img width="313" height="218" alt="Screenshot 2025-11-07 at 3 39 51 PM"
src="https://github.com/user-attachments/assets/2b6f455a-7586-494d-af76-20fee4b85170"
/>
0 commit comments