Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Optimize display of large DynamicMap parameter space #2646
As described in #2645, a DynamicMap with a large parameter space can be very slow to initialize, this is because we have started to process its keys more consistently but did not take into account the fact that the DynamicMap parameter spaces can be much larger. This now avoids a number of computations that are not necessary and optimized some others:
def test(t, z, cmap, vmin, vmax): return hv.Image(np.random.rand(100, 100)) dmap = hv.DynamicMap(test, kdims=['t','z', 'cmap', 'vmin','vmax']).redim.values(t=range(10), z=range(10) ,cmap=['viridis','Greys'], vmin=range(100), vmax=range(100,200))
This DynamicMap defines a parameter space with 2 million keys, previously this would take 52 seconds to display, with this PR this drops to 0.5 seconds.