react-py icon indicating copy to clipboard operation
react-py copied to clipboard

load `pyodide_http` only if requests/urllib are used

Open YoniChechik opened this issue 2 years ago • 1 comments

loading pyodide_http only when it's relevant can make the inital loading faster.

YoniChechik avatar Aug 21 '23 13:08 YoniChechik

It would make initialisation slightly faster, but downloading the library would only happen once and then be available from the browser cache. In many cases, it's not known if the library is needed to patch http functionality, especially when running arbitrary code from a user.

I can add an optional flag to disable this patch for those who want to optimise loading speed.

elilambnz avatar Aug 27 '23 22:08 elilambnz