Once it does start then your arguments can make sense, but even so it would still make it impractical for most things.
Trust me, when the Javascript dev tells you something will be slow, it WILL be very slow
Once it does start then your arguments can make sense, but even so it would still make it impractical for most things.
Trust me, when the Javascript dev tells you something will be slow, it WILL be very slow
My https://lite.datasette.io application usually starts up in less than 10s - most of that is downloading about 10MB of WASM blobs, and 10MB isn't actually that big these days (many sites serve more than that in image headers).
When I built Datasette Lite I did it as a research project, assuming it would be far too slow loading to be useful. I've since changed my mind on that.
10 seconds is absurdly slow, though. That's like time to install Mathematica from a disk image level slow.
I hate to say this, but have you used any $ModenWebApp with $HotJSFramework recently? I thank the gods when those pages load without a 5-10 second of fancy spinning animation. Really thought we would be in a better place by 2024 but nope.
A very rough estimate just now on my iPhone over 5G: 12s for the first load, then when I visited again took around 3s.
Indeed, the web demo takes about 5 seconds to cold-start on my beefy PC, between downloading the 22MB WASM blob and compiling it. It also grows the WASM heap to 160MB after running the simple Fibonacci example, and WASM heaps can't (yet) be shrunk, so the only way to reclaim any of that memory is to discard the whole instance and start over.
It's cool that it works, but not very practical.
You could just run RustPython as a native binary, or use ol' reliable CPython.
Granted, the environmental cost to all that extra energy consumption may not be palpable. Then again, you're exactly choosing Python in the first place if you care about the environment.
Internal business crud apps often take multiple seconds on every click. Even a minute for an employee to start an app that is then snappy would be acceptable for practically any internal business usecase if they can just leave the tab open, and there's no technology reason why python wasm interpreters would need to be that slow.
Only seconds? Today it takes 45 minutes to do the update by hand, but there's this handy 20-line Python script that does it instantly.
(Hypothetical example only, but it's not uncommon.)