Hi, I’m working on a project where we are using bokeh to generate graphs.
The particularity of this project is that the graphs are generated at run time on a server and directly displayed on a web client.
So we want the graph generation to be as fast as possible.
Currently, we see that a graph could take about 5-8s before being displayed on the client.
After some digging inside the bokeh’s code and some help from the gitter discussion, I found that most of this time is for compiling the custom js tools.
Each time a graph is requested, the server calls the function bundle_all_models() which takes about 5-8s.
What I’d like to do is to cache the result of this call so when a request is made to display a graph, the cached value is used and the time is reduced.
Here is how I thought I could do this :
-
Add a server option to enable/disable bundle caching
-
Modify bunde_all_models of compiler.py to use cached version when caching is enabled.
-
When launching the bokeh server with caching enabled, precache the compulation result so a new request will directly use the cache.
What do you think about those steps ? Could the be accepted in the main branch ?
Also, where could I store the cached compilation result ?
Thanks for your help.
Cyril

