
Faster dashboards via context menu improvement
We sped up dashboards by optimizing the content menu a bit. Will be especially efficacious on the largest dashboards.
Transcript
This transcript is auto-generated. Names and product terms may be wrong.
Hello. So the first demo I have today is performance improvement on dashboards. So before for every single tile we were creating a new instance of a menu for every single dashboard and for very large dashboards that's a lot of uh nodes in the DOM and a lot of these portal nodes here too which we still have a lot.
Now it shares the context menu between these. So the content in here is dynamically rendered. There's only one instance of a context menu on the page at any given time. And a developer who wants to utilize this would use the use context menu hook and they would pass in the content prop, but instead of a React node, it would specify a functional component.
A functional component accepts optional props when on context menu is called. That is then passed to the content component as props allowing you to dynamically render.