Closed almarklein closed 3 years ago
A question about serialization: did you compute the JSON serialization time of the figure? If it's a significant fraction of the time it might explain why the difference between heatmap and heatmapgl is not huge. (and are you using plotly 4.13 which should reduce the serialization time for Heatmap and Heatmapgl ?)
Update: forget what I wrote, since the callback is clientside probably there is no serialization
I tried the same benchmark on larger (256x512x512) and random uint8 (worst case for png compresseion) data and
Note that the performace of the noop
and empty
modes are improved when setting the update_title
of the app to None:
app = dash.Dash(__name__, update_title=None)
also see https://dash.plotly.com/external-resources. I think this also slightly improves the png mode.
I added update_title=None
. I'm surprised at how much this improves the performance ...
I was looking for ways to improve the performance of the slicer, and decided to do a bit of benchmarking. This adds a script to test the performance of updating an image with Plotly+Dash.
It contains a
dcc.Interval
that tries to update a figure as fast as it can. The time it costs to do this will slow the interval down, so we can measure fps. Of course this FPS value depends on a lot of factors, but it's valuable to see the differences between methods.Some observations:
no_update
, the FPS does not go beyond 20. Not sure whether this is some rate limit or some overhead in Dash.In summary, I had hoped the glheatmap would allow us to get more smooth interaction. Alas. On the plus side, we seem to have some internal overhead that we can hopefully fix to make things more smooth!