Finer grained loadPyodide
#4706
CNSeniorious000
started this conversation in
General
Replies: 1 comment 2 replies
-
Yeah we would be interested in doing something like this @ryanking13 has investigated the lifecycle callbacks approach e.g. It's not that likely I'll have time to work on it any time soon but if you want to contribute something I'd be willing to help out with design/review. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Initiating Pyodide is unavoidable time-consuming. In my use cases, it usually consists of 3 steps:
With browser caching, subsequent starts only require waiting for the wasm initialization block.
However, the first step is particularly frustrating for me. Sometimes it even takes longer than 2 minutes under poor network conditions, and occasionally it fails to fetch the files.
(This issue often arises in China where there is a firewall that blocks unregulated internet access, including public CDNs like jsDelivr.)
Therefore, I want to fetch these static assets myself, and provide the Blobs or as any format else to
loadPyodide
, instead of providing anindexURL
, so that I can:Or, can
loadPyodide
provide some parameters likeloadPyodideWasm
andloadStdlibZip
, or some lifecycle callbacks likebeforeExecutingWasm
andonFetchTimeout
? I am not sure which one is the best practise.Beta Was this translation helpful? Give feedback.
All reactions