Our dashboard has three relatively data-hungry plots:
- two image plots (200x200x3)
- custom extension tool plot (200x200x4).
We 'update' (send data to) them from doc.add_next_tick_callback
s. We are hitting a weird situation where the image
plots appear to be working for a split second and then a websocket message comes which erases everything in their buffer.
We traced frontend and backend and it seems that:
- frontend gets initialized with empty buffers (good)
- frontend sends a PATCH-DOC back with empty buffers
- in the meantime the actual-data update arrives from the server (which makes images work for a split second)
- finally the empty PATCH-DOC gets pinged back to frontend resetting our figures.
We did extensive reading of the frontend codebase, and found that when we removed
this.send(patch_message)
from connection.ts
line 166, our problem is gone.
What could be causing this ping/pong behaviour?
Could this be a bug or did we do something wrong?
Tested on Bokeh version 1.0.4