8000 Precompilation for production use cases · Issue #197 · pyscript/pyscript · GitHub
[go: up one dir, main page]

Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Precompilation for production use cases #197

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

Closed
Daniel15 opened this issue May 4, 2022 · 4 comments
Closed

Precompilation for production use cases #197

Daniel15 opened this issue May 4, 2022 · 4 comments
Labels
backlog issue has been triaged but has not been earmarked for any upcoming release tag: pyodide Related to issues with pyodide tag: tooling Related to the configuration of infrastructure and tooling type: feature New feature or request

Comments

@Daniel15
Copy link
Daniel15 commented May 4, 2022

For production use cases, it'd be useful to:

  • Have the ability to compile the app's Python code to WebAssembly as part of a build process.
  • Implement some form of tree shaking such that the unused parts of the Python libraries are removed as part of the build process, leaving just the code that's actually needed.

This could probably make it viable for some real use cases rather than just as an experiment 😄

@verhulstm
Copy link
Contributor

hi,

yes we already can compile the app's Python code to WebAssembly

check out

#85

@Daniel15
Copy link
Author
Daniel15 commented May 4, 2022

Sounds good. That just leaves tree shaking I guess, similar to what Blazor does (since Microsoft don't want Blazor apps to ship the entire .NET Framework to the user, as it's quite large, it removes bits that aren't used as part of the build)

@verhulstm
Copy link
Contributor

yup, work is being done on tree shaking

check this out

https://jott.live/markdown/wasm_binary_size

and we are looking into other things to do to

@fpliger
Copy link
Contributor
fpliger commented May 19, 2022

Great suggestions, thanks @Daniel15 !

Have the ability to compile the app's Python code to WebAssembly as part of a build process.

I think the problem with this is that the problem is not only pre-compiling but also running it for the first time. It takes time. (I may be wrong here though).

Implement some form of tree shaking such that the unused parts of the Python libraries are removed as part of the build process, leaving just the code that's actually needed.

There's work being done about that upstream. For instance pyodide-pack is a great example.

This could probably make it viable for some real use cases rather than just as an experiment 😄

This is less about "real use cases" and more about being viable to specific use cases. PyScript is much of an experiment as any project so early in its development. There are specific use cases that will never be good ones for PyScript but there are many use cases where PyScript is a viable option today.

If you can elaborate on your use cases it could definitely be interesting for the core team to take into consideration as PyScript matures.

@fpliger fpliger added type: feature New feature or request tag: pyodide Related to issues with pyodide tag: tooling Related to the configuration of infrastructure and tooling labels May 19, 2022
@marimeireles marimeireles added the backlog issue has been triaged but has not been earmarked for any upcoming release label Sep 29, 2022
@pyscript pyscript locked and limited conversation to collaborators Feb 12, 2023
@marimeireles marimeireles converted this issue into discussion #1168 Feb 12, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
backlog issue has been triaged but has not been earmarked for any upcoming release tag: pyodide Related to issues with pyodide tag: tooling Related to the configuration of infrastructure and tooling type: feature New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants
0