FigureWidget with multiple traces: updates are very slow

Hello everyone,

I just started using plotly few days ago and I am not too familiar with it yet. I am currently facing some performance issues, so I am wondering what can be done to improve that.

I have a plot that consists of multiple layers (Surface and Scatter3d), can be more than 100 and each layer may consist of up to hundred points. I added those layers via add_traces to a FigureWidget. I added an IntSlider and in each step I want to adjust the color for each layer. Setting and rendering the new color is extremely slow. Here is some pseudocode:

import plotly.offline as py
py.init_notebook_mode(connected=True)

self.fig = go.FigureWidget(layout=go.Layout(autosize=False))
slider = IntSlider(min=0, max=self.steps, continuous_update=False)
slider.observe(self.update_z, names="value")
self.plot = VBox([self.fig, slider])


def update_z(self, change):
  step = change['new']   
  for i in range(len(self.fig.data)):
	self.fig.data[i].surfacecolor = self.new_color[step][i]

Is self.fig.data[i].surfacecolor = self.new_color[step][i] internally copying arrays? Or is the problem here just the slow rendering in the browser?