Interactive 3D surface plot - how to control Plotly's update behaviour

I’m building an interactive plot with holoviz-panel (I’m required to use it): everything works fine, except that Plotly refreshes the figure every time I change a property. So when I move the slider by one tick, Plotly refreshes the figure 4 times, which is annoying to see.

Is there a way to ask Plotly to only refresh the figure at the end of the update function?

import numpy as np
import plotly.graph_objects as go
import panel as pn

color_func = lambda x, y, z: x * y
f = lambda r, d: 10 * np.cos(r) * np.exp(-r * d)
x, y = np.mgrid[-7:7:100j, -7:7:100j]
r = np.sqrt(x**2 + y**2)
z = f(r, 0.1)
surfacecolor = color_func(x, y, z)
fig = go.Figure([
    go.Surface(x=x, y=y, z=z, surfacecolor=surfacecolor, cmin=surfacecolor.min(), cmax=surfacecolor.max())
fig.update_layout({"scene": {"aspectmode": "cube"}})

slider = pn.widgets.FloatSlider(start=0, end=1, value=0.1)
def update(d):
    surfacecolor = color_func(d * x, y, z)[0]["z"] = f(r, d)[0]["surfacecolor"] = surfacecolor[0]["cmin"] = surfacecolor.min()[0]["cmax"] = surfacecolor.max()
    return fig
pn.Column(slider, update)