I was displaying a rasterized Trimesh on a tile background and using the Panel approach I am returning an overlay. I added a time slider for displaying the changing ‘z’ values on the Trimesh and the resulting animation flickered the screen as it updated.
I repeated the same with a DynamicMap approach and kept the tiles overlay out of the rasterized DynamicMap and the result was much smoother and faster.
Is this expected or is there a way to do the same in the param.Parameterized class approach that I was using? Or should I combine the two approaches by keeping some controls in the param.Parameterized and using DynamicMap . Advice please. Thanks
The DynamicMap approach is always going to be more optimized than using Panel param support since HoloViews automatically figures out a minimal diff to apply to the plot while Panel+Param generally triggers a full re-render of the plot. You can in fact use the exact syntax for both however, e.g. this is valid (pseudo-code):
So the best approach is to mix and match the two approaches as needed. I’m hoping to add a performance guide to the Panel docs in the near future which will have a section about HoloViews and DynamicMap.
I have used the above strategy and found that it has best of both worlds i.e. performance of DynamicMap and widget selection from panel. Am I missing something or should this be a best practice when building dashboards ?