Calling bokeh api from python / flask for charts -- becoming slower with each call
I also face this problem. It turns out Bokeh stores data in its curdoc across requests. 
I fix this by manually clearing bokeh document everytime at the end of each request with:   curdoc().clear()
I am running a flask application which makes calls to a bokeh api for generating charts to be rendered in html. The first time I generate the chart, it is taking about 0.07s. The second time, about 0.14s. The third time about 0.21s, and so on. I must be doing something wrong. Wondering if anyone has any thoughts on how to fix this. Thank You. Neela.