Working with points object in live data

Hey everyone. I’m working with a huge dataset stored in an xarray.

Now I’m loading the data:

rasterize(hv.DynamicMap(self.f,kdims = ['time', 'idx']))
return(s.redim.range(time=(0,len(self.data['time'])-1),idx=(0,len(self.data['height'])-1)))

the raster is an trimesh that is calculated by the function:

def f(self, time, idx):
        
        self.verts['value'] = self.data[self.attr][time][idx]  
        points = gv.operation.project_points(gv.Points(self.verts, vdims=['value']))
        trimesh = gv.TriMesh((self.tris, points),crs=ccrs.Mercator())
        
        return trimesh

In the end the trimesh is just changing the points from xarray and replacing them. Is there a faster way to handle the data? Maybe calculating everything before and storing the data in an array of trimeshes? I wasn’t able to figure out a way to make the interactive plots faster.

If anyone could help, I’d really appreciate it.