title: Jupyter dash freezes and doesn't update the plot
body: <p>There is a pandas dataframe that is updating in a loop and I have to plot updated data from it with jupyter-dash every ~400-1000 ms.
  At the beginning all <code>df.response</code> values are <code>None</code> and then it starts to fill it. Here is an example:</p>
  <p>At the beginning:
  <img src="https://i.stack.imgur.com/Uq3PG.png" alt="at the beginning" /></p>
  <p>After it starts to fill:
  <img src="https://i.stack.imgur.com/EbfG9.png" alt="after it starts to fill" /></p>
  <p>but I have faced with such problem:<br />
  When we have about 100 values on the x and y axes, jupyter dash just freezes and doesn't update my heatmap anymore</p>
  <p>My code:</p>
  <pre><code>import plotly.graph_objects as go
  import numpy as np
  import pandas as pd
  from jupyter_dash import JupyterDash
  import dash_core_components as dcc
  import dash_html_components as html
  from dash.dependencies import Input, Output, State
  
  # initialise dataframe and figure
  df = data.get_result()  # It is my dataframe that is updating every several milliseconds
  fig = go.Figure(data=go.Heatmap(z=df.response,
                                  x=df.currents,
                                  y=df.frequencies))
  
  # Build App
  app = JupyterDash(__name__)
  app.layout = html.Div(
      [
          dcc.Graph(id=&quot;heatmap&quot;, figure=fig),
          dcc.Interval(id=&quot;animateInterval&quot;, interval=1000, n_intervals=0),
      ],
  )
  
  @app.callback(
      Output(&quot;heatmap&quot;, &quot;figure&quot;),
      Input(&quot;animateInterval&quot;, &quot;n_intervals&quot;),
      State(&quot;heatmap&quot;, &quot;figure&quot;)
  )
  def doUpdate(i, fig):
      global df
      df = data.get_result()
  
      return go.Figure(fig).update_traces(z=df.response)
  </code></pre>
  <p>So as I said, the dataframe is updated, but after a few seconds of getting this updates, jupyter dash stops responding to these updates and freezes. How can I improve my code to make jupyter dash more stable?</p>