I have an application originally written as a bokeh server app that is embedded in another web framework (e.g. Flask/gunicorn). This has been successfully refactored into a combined panel/bokeh application which I can also serve through Flask/gunicorn. See Panel Discourse Topic 978.
The purpose of this topic is to seek advice on what possibilities exist to speed up the time it takes to start a client session.
In the pure bokeh solution, the process to add roots to a document D is accomplished as follows. Per the profiling information this takes approx. 0.5s on the server computer.
_ = [D.add_root(r) for r in C.roots]
The corresponding step in the panel/bokeh implementation creates a panel Column
from a list of panel viewables and invokes server_doc() on the bokeh document D so that the items are added to the client’s web page. This takes approx. 2s on the same server computer.
pn.Column(*_ll).server_doc(D)
Are there any tips to try to bring these two closer to parity in terms of execution time?