Working with larger files (> 100MB) - Google Chrome cannot load the file

I’ve had quite a bit of difficulty working with large Bokeh saved html files (say, > 50MB or > 100MB) - it seems that Google Chrome just (excuse my language) craps out, and closes the connection and gives me a “cannot load file” (when loading file) or “connection broken” (when using bokeh --server) error.

Is this a common experience for other users for detailed graphs/charts?
Is there a workaround?

Appreciate any help.

Thank you.

Hi @ceremony,

You may be asking too much of a web browser… I tend to head to holoviews / datashader when handling larger datasets of course here I think you will need to keep a server running in the background rather than just a static html, my understanding is that holviews / datashader puts an image in the browser rather than whole dataset so this ultimately helps keep the browser memory down and responsive and as long as you have a server running you can zoom around.

The people here might be able to help you if you provide a minimal working example of what you have I think it will help diagnosing anything and suggesting solutions but as above holoviews is my go to for larger datasets.

Thanks, Carl.

Bokeh is geared towards high interactivity so all data is sent to the browser. Then any coordinates are also mapped to screen space and stored and also (for some glyphs) a spatial index is also created. Starting from 100mb you might end up with 200mb or more of that in one browser tab (and none of this counts the expense of serilization/deserialization). That’s never going to be a good experience. Bokeh by itself is just not the correct tool for this. Using holoviews + datasahder to generate Bokeh output is what I suggest for larger data sets.

Alternatively, you can look at reducing the data, i.e. either by downsampling or subsetting or aggregating.

1 Like