Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

load pyodide_http only if requests/urllib are used #231

Open
YoniChechik opened this issue Aug 21, 2023 · 1 comment
Open

load pyodide_http only if requests/urllib are used #231

YoniChechik opened this issue Aug 21, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@YoniChechik
Copy link

YoniChechik commented Aug 21, 2023

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

@elilambnz elilambnz self-assigned this Aug 27, 2023
@elilambnz elilambnz added the enhancement New feature or request label Aug 27, 2023
@elilambnz
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants