panel icon indicating copy to clipboard operation
panel copied to clipboard

pyodide/pyscript html loading spinner stutters

Open samimia-swks opened this issue 1 year ago • 4 comments

When a panel app is converted to pyodide / pyscript with panel convert, a loading spinner is shown while pyodide loads, which can take 10s of seconds. The spinner freezes every second or so, which is not a big deal, but it is not great to look at. It would be good to make it smoother, or at least give the user the option to replace the spinner with a basic 'loading...' text modal.

image

ALL software version info

panel 1.4.4 html opened with chrome on linux or edge on windows 11

samimia-swks avatar Aug 01 '24 01:08 samimia-swks

I believe that it does not freeze if --out is the default --pyodide-worker?

MarcSkovMadsen avatar Aug 01 '24 09:08 MarcSkovMadsen

Indeed, the default pyodide target is nice and simple since you can just share the resulting HTML but if you care about performance then you should use pyodide-worker instead. This is documented here: https://panel.holoviz.org/how_to/wasm/convert.html#formats

philippjfr avatar Aug 01 '24 12:08 philippjfr

I actually need a portable html file so I cannot use pyodide-worker. Also, the performance of 'pyodide' for what I am doing is great, the only problem is the spinner. I feel like if the pyodide target cannot handle rendering a spinner then there shouldn't be one. A simple 'loading...' text would do and would not over the impression of a bad UI.

samimia-swks avatar Aug 01 '24 17:08 samimia-swks

That's fair.

philippjfr avatar Aug 01 '24 18:08 philippjfr