My colleague and I are working on a simple, locally hosted website through which a data stream produced by a few measurement devices can be viewed. We would like to use bokeh to embed live updating plots on our website, and are trying to get a simple prototype to run. We follow the embed example “animated” pretty closely, but the problem is that the browser we use to view the plot starts to use huge amounts of memory. Forcing ourselves to close the browser every few minutes (the data comes in at a pretty high rate) is not an option.
We did not test the “spectrometer” example, but this would seem to work without any memory issues. Is this due to the fact that a JavaScript is used to render the plot somehow? Or can we solve this problem purely in Python, without having to write in JavaScript?
The MWE is available at https://www.dropbox.com/s/n7yvja14dgov9gs/StackExchange.7z?dl=0 In order to reproduce the problem, run ‘bokeh-server --backend=memory’, the ‘plotting.py’ in the app folder, and then ‘run.py’ in the StackExchange folder. Go to localhost:5000/data and watch the memory usage climb.
I have asked the same question on StackExchange: http://stackoverflow.com/questions/28939097/embedding-bokeh-plot-in-html-eats-memory

