I have a question regarding the Bokeh server. I am running an application with Bokeh 1.4.0 and Python 3.8.13.final.0. The application should show a mass chain under dynamic behaviour. I’ve implemented the start/stop button in the main file, which calls a callback function. The function in the callback function is still in the main file, but it uses an imported function from a separate .py file for calculating the new locations of the masses. The new locations are stored in the ColumnDataSource, which was used for the plot. The only problem is that the animation is quite slow. I tried using some print() functions to test the code, and it looks like the calculation of the displacements and the update of the ColumnDataSource are pretty fast. However, the plot needs about 1-2 seconds to update for each time step of 0.1 seconds.
I also tried different callback frequencies and tried using: output_backend=“webgl”, but none of those changes seemed to affect the plotting speed.
Do you have any ideas about what might be causing this and how it can be solved?
Thank you very much and best regards,
Sonja