Pluto.jl
Pluto.jl copied to clipboard
HTML exports: load image data with separate requests
Website like this one load quite slow:
https://computationalthinking.mit.edu/Fall22/images_abstractions/seamcarving/
Because the statefile contains data for lots of images.
A normal website would first load the page (containing <img> tags), render it, and then start loading images and display then dynamically.
We could achieve the same effect if we split the statefile in multiple parts, specifically, if we first load the statefile without large image data, and then load those later. I think the cleanest way to achieve this is:
- allow published data (#1124) to be requested from a separate file. when a cell renders, it will first request all of its published data if necessary, and then render
- for the image mimes, put the data in a published object and link to it. Ideally, the image dimensions are instantly available, to avoid vertical shifts while loading the images.
With this approach, we would also really improve performance for notebooks that have a lot of plots with #1124, like PlutoVista.jl!