
I am using bokeh as a Server Application, and I hope someone has some suggestions for my issue.
I have 4-10 tabs with 2-10 plots each one. I need to draw some lines (profiles) and other scatter points in all the plots of all tabs when some samples are selected. If I update these profiles just in the current tab everything works smoothly and without any problem. But when I update all the profiles in all the tabs, the app takes a long time to update the samples (5-10 seconds).
Solutions I have discarded:
- Dask. The algorythm takes just 1-2 seconds in creatin the new data, so the problem happens when the data is sent to the front-end. Also, Dask Dataframe have some overhead and I believe they are meant to work with a bigger amount of data
- Datashader. The user must be able to click on all the points all the time, they are around 3000 samples in each plot. So I cannot use this approach either
- Update the data in two steps. I can update just one tab and a few seconds later the rest of tabs. The current tab is updated well, but when I update the data of the rest of the tabs the app freezes, so this is not a good idea. I asked time ago for a callback that is triggered when everything is rendered, however, I am afraid I will have the same problem as with the timeout I tested.
- Using patch instead of updating the whole dataframe takes the same amount of time. I believe this is because it takes a lot to build the patches structure.
Actually, I don’t know where the bottle neck is and how to check it. It has to be when transfering the data to the front-end or when bokeh is redrawing the glyph with new data. How can I check that?
Is there a better way to update in two steps and keep the app interactivity working? Is there a better way to improve the performance of this data updates?
Can Web Workers help in with this process in some way?
I made some analysis when I press some sample to draw the profiles


