Plotly v4 Speed Increase Opportunities

I have a python plotting application that leverages plotly to create plots that typically have a large (~20) number of subplots. I recently upgraded from plotly v2.0.10 to v4.1.0. It was very slow to generate plots using v2, and to fix this I was able to make this change to the plotly code to get a huge speed boost:

Find in graph_objs/graph_objs.py:
self['data'] += [trace]
Replace with:
self['data'].append(trace)

Now that I’ve upgraded, the performance problem is back. Is there a similar change I can make in v4 to fix this bottleneck? Am I correct in assuming the poor performance comes from this line in basedatatypes.py:

# Make deep copy of trace data (Optimize later if needed)
new_traces_data = [deepcopy(trace._props) for trace in data]

Any thoughts/tips? Thanks

This is a #api:python question.

The best place to discuss this would probably be a Github issue here https://github.com/plotly/plotly.py/issues … what do you think @jmmease ?

Updated the tags, thanks