The colormaps widget starts by loading all of the matplotlib colormaps from python, syncing it to js, and then loading all of these into the colormaps module in wasm. The current logic reloads colormaps into wasm every time a function on the js side of the colormaps widget is called. This can be bypassed with checks in the promises of the colormaps js functions.
The colormaps widget starts by loading all of the matplotlib colormaps from python, syncing it to js, and then loading all of these into the colormaps module in wasm. The current logic reloads colormaps into wasm every time a function on the js side of the colormaps widget is called. This can be bypassed with checks in the promises of the colormaps js functions.
See discussion in https://github.com/data-exp-lab/yt-canvas-widget/pull/6 for more detail on doing this.