I was looking at https://observablehq.com/@tmcw/why-observable-for-people-who-already-have-a-text-editor and https://bost.ocks.org/mike/make/ recently, and thinking about some of my own notebooks, and I realized that one still-sometimes-frustrating thing about Observable is that some notebooks have very high precomputation-at-startup latency (and if authors aren’t delegating to web workers, etc., the main UI thread can be stalled causing the browser UI to get glitchy and unresponsive). This can be a real killer on low-end devices.
If running (e.g. jupyter) notebooks or other programs locally, it is often convenient (with relatively low friction) to cache partially computed results while working on later steps. But in Observable this gets inconvenient.
I realize there are tricky considerations around hosting costs, the dynamism of DOM elements, etc., but it would be a really neat feature if we could import cached {foo} from "@user/bar"
and have the Observable servers run the notebook once to create the content of foo
, and then subsequently just serve up the computed data (html fragment, image, big binary data file, …) instead of needing to manually export the cell output, rehost it at some other site, and then load it via the fetch API or whatever, remembering to repeat the process any time the cell’s computation changed.
Or maybe even a way to specify the same “get this from cache if possible” logic within the syntax of a cell, perhaps with a cached
keyword similar to viewof
.
Anyway, this is not a short-term demand, but just an idea for you folks to think about as an addition in the months or years ahead.