Hi all,
We need thoughts/opinions on the following proposal:
Change the default output mode on output_file and output_notebook to be CDN.
Current stateYou may be doing the following:
from bokeh.io import output_notebook, show
output_notebook()
Make a plot p
show(p)
or
from bokeh.io import output_file, show
output_file(‘myplot.html’)
Make a plot p
show(p)
When you do this, the asset you’re creating - either the notebook, or the html file has all the of bokeh css and javascript inlined into it.
Using this default, the minimum size of the html/ipynb created is ~1.6M
The pro:
- Your document will work completely standalone
- Your document has the exact js & css that you used to make it
The con:
- Your document is large
By contrast when using CDN, the minimum size is ~20k.
This minimum size then grows, with your data and plot definitions.
If you want to see this issue in action, I’ve created some notebooks you can test it out in: http://nbviewer.ipython.org/github/birdsarah/bokeh-miscellany/tree/master/tests/resources/
We’d love to get your thoughts on this issue.
There maybe other options e.g. make it clearer that there’s a CDN option.
Either by replying on the list here or the issue is open on github: output_notebook resources · Issue #2572 · bokeh/bokeh · GitHub
Sincerely,
Sarah Bird


