Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

Image.save_as very slow

Hi Everyone,
I need to save locally a 3D surface plot so I can embed it into a presentation.
After creating the fig (using plotly offline and Python) as

fig = plotly.graph_objs.Figure(data=data, layout=layout)

I use:

plotly.plotly.image.save_as(fig, ‘3D_pattern.png’)

Everything works perfectly, but it is REALLY slow: generating the fig object takes a few ms, but the save_as operation takes around 20sec for a 1000x1000 pixel figure (about 75KB on disk)!

Does anyone a way to speed it up or an alternative way of doing it?